#install.packages("knitr")
library(knitr)
knitr::opts_knit$set(root.dir = "/Users/floriangoldinger/Desktop/Unilu/Forecasting in Economics and Business/Forecasting Project")
knitr::opts_chunk$set(message = FALSE,warning=FALSE)
rm(list = ls())
#install.packages("tseries")
#install.packages("xts")
#install.packages("forecast")
#install.packages("tsbox")
#install.packages("seasonal")
#install.packages("mFilter")
#install.packages("bruceR", dep=TRUE)
#install.packages("fanplot")
library(tseries)
library(xts)
library(forecast)
library(tsbox)
library(seasonal)
library(mFilter)
library(dplyr)
library(readxl)
library(vars)
library(MASS)
library(bruceR)
library(fanplot)
Load data:
rawData <- read_excel("retail_sales_transp_March.xlsx")
Convert the data frame to a xts object and use the first column as date:
data <- as.xts(x = rawData[, -1], order.by = as.Date(rawData$Date))
Take the first difference of the log to later work with the growth rates :
data$df_Retail_sales <- diff(log(data$Retail_sales), lag = 1, differences = 1)
data$df_Inflation <- diff(log(data$Inflation), lag = 1, differences = 1)
data$df12_Retail_sales <- diff(log(data$Retail_sales), lag = 12, differences = 1)
data$df_CHFEUR <- diff(log(data$CHFEUR), lag = 1, differences = 1)
data$df_Unemploy <- diff(log(data$Unemploy), lag = 1, differences = 1)
data$df_Brent_COIL <- diff(log(data$Brent_COIL), lag = 1, differences = 1)
data$df_Retail_EU <- diff(log(data$Retail_sales_EU), lag = 1, differences = 1)
Delete first row because of differencing
data <- tail(data, -1)
Visualize data
plot.xts(cbind(data$Retail_sales), main = "Retail Sales Index (not seasonally adjusted)")
plot.xts(cbind(data$df_Retail_sales), main = "Retail Sales Growth rate (not seasonally adjusted)")
plot.xts(cbind(data$Retail_sales_EU), main = "Retail Sales EU")
plot.xts(cbind(data$df_Retail_sales), main = "Retail Sales Growth rate (not seasonally adjusted)")
plot.xts(cbind(data$CHFEUR), main = "CHF/EUR")
plot.xts(cbind(data$Inflation), main = "Inflation")
plot.xts(cbind(data$Brent_COIL), main = "Brent Crude Oil")
Seasonally adjust df Retail sales and df Retail Sales EU with monthly dummies.
monthlyDummies <- forecast::seasonaldummy(ts_ts(data$df_Retail_sales))
modelretailseasonch <- lm(data$df_Retail_sales ~ monthlyDummies)
plot.xts(as.xts(modelretailseasonch$fitted.values), main = "Swiss Retail Sales: fitted with seasonal dummy")
plot.xts(as.xts(modelretailseasonch$residuals), main = "Swiss Retail Sales: deviations from seasonal dummy")
data$Retail_sales_cycle <- modelretailseasonch$residuals
modelretailseasoneu <- lm(data$df_Retail_EU ~ monthlyDummies)
plot.xts(as.xts(modelretailseasoneu$fitted.values), main = "EU Retail Sales: fitted with seasonal dummy")
plot.xts(as.xts(modelretailseasoneu$residuals), main = "EU Retail Sales: deviations from seasonal dummy")
data$Retail_EU_cycle <- modelretailseasoneu$residuals
Create pandemic dummies to later exclude this period from analysis - suggesting a pandemic period from 01/01/2020 to 31/21/2021.
pandemicDummies <- as.xts(ts(matrix(0, nrow = 320, ncol = 24), start = c(2000, 2), frequency = 12))
pandemicDummies["2020-01-01", 1] <- 1
pandemicDummies["2020-02-01", 2] <- 1
pandemicDummies["2020-03-01", 3] <- 1
pandemicDummies["2020-04-01", 4] <- 1
pandemicDummies["2020-05-01", 5] <- 1
pandemicDummies["2020-06-01", 6] <- 1
pandemicDummies["2020-07-01", 7] <- 1
pandemicDummies["2020-08-01", 8] <- 1
pandemicDummies["2020-09-01", 9] <- 1
pandemicDummies["2020-10-01", 10] <- 1
pandemicDummies["2020-11-01", 11] <- 1
pandemicDummies["2020-12-01", 12] <- 1
pandemicDummies["2021-01-01", 13] <- 1
pandemicDummies["2021-02-01", 14] <- 1
pandemicDummies["2021-03-01", 15] <- 1
pandemicDummies["2021-04-01", 16] <- 1
pandemicDummies["2021-05-01", 17] <- 1
pandemicDummies["2021-06-01", 18] <- 1
pandemicDummies["2021-07-01", 19] <- 1
pandemicDummies["2021-08-01", 20] <- 1
pandemicDummies["2021-09-01", 21] <- 1
pandemicDummies["2021-10-01", 22] <- 1
pandemicDummies["2021-11-01", 23] <- 1
pandemicDummies["2021-12-01", 24] <- 1
ACF and PACF graphs to determine AC and MA lag
par(mfrow=c(1,2))
acf(data$Retail_sales_cycle,lag.max = 20, na.action = na.contiguous, main = "Inclusive Pandemic")
acf(data["/2019-12-01"]$Retail_sales_cycle,lag.max = 20, na.action = na.contiguous, main = "Exclusive Pandemic")
par(mfrow=c(1,2))
pacf(data$Retail_sales_cycle,lag.max = 20,na.action = na.contiguous, main = "Inclusive Pandemic")
pacf(data["/2019-12-01"]$Retail_sales_cycle,lag.max = 20,na.action = na.contiguous, main = "Exclusive Pandemic")
When excluding the pandemic period and thereafter: ACF/PACF suggests including 2 AC and 1 MA term Still some seasonality (non deterministic) - include a SARIMA model in a later stage?
Check with Arima (2,0,1) as suggested by AC and ACF including pandemic dummies - BIC of -1312.4
forecast::Arima(data$Retail_sales_cycle,
xreg = pandemicDummies["2000-02-01/2024-03-01"],
order = c(3L, 0L, 0L))
Series: data$Retail_sales_cycle
Regression with ARIMA(3,0,0) errors
Coefficients:
ar1 ar2 ar3 intercept Series 1 Series 2 Series 3 Series 4 Series 5 Series 6 Series 7
-0.5892 -0.3997 -0.1062 -1e-04 -0.0182 0.0036 -0.0593 -0.1357 0.2514 0.0167 -0.0220
s.e. 0.0588 0.0643 0.0600 6e-04 0.0190 0.0220 0.0221 0.0222 0.0222 0.0223 0.0223
Series 8 Series 9 Series 10 Series 11 Series 12 Series 13 Series 14 Series 15 Series 16 Series 17
-0.0170 -0.0306 0.0457 -0.0113 0.0142 -0.0828 -0.0548 0.2231 -0.0235 -0.0474
s.e. 0.0223 0.0223 0.0223 0.0223 0.0223 0.0223 0.0223 0.0223 0.0223 0.0223
Series 18 Series 19 Series 20 Series 21 Series 22 Series 23 Series 24
-0.0018 -0.0481 0.0121 -0.0134 0.0414 0.0130 -0.0389
s.e. 0.0223 0.0223 0.0222 0.0223 0.0221 0.0221 0.0191
sigma^2 = 0.0003974: log likelihood = 738.41
AIC=-1418.83 AICc=-1412.14 BIC=-1312.4
We check for the best AIC and MIC with different lags. Now a bigger model is chosen ARIMA(3,0,3) with the BIC information criterion. BIC -1337.453 but only minor improvement to more simple model.
nArOrder <- 4
nMaOrder <- 4
matrixAIC <- matrix(data = NA,nArOrder+1,nMaOrder+1)
matrixBIC <- matrix(data = NA,nArOrder+1,nMaOrder+1)
for(iArOrder in 0:nArOrder){
for(iMaOrder in 0:nMaOrder){
temp = forecast::Arima(data$Retail_sales_cycle,
order = c(iArOrder,0,iMaOrder),
xreg = pandemicDummies["2000-01-01/2024-03-01"])
print(iArOrder)
print(iMaOrder)
print(temp$bic)
print(-2*temp$loglik + (iArOrder+iMaOrder)*log(length(data$Retail_sales_cycle)))
matrixAIC[iArOrder+1,iMaOrder+1] = temp$aic
matrixBIC[iArOrder+1,iMaOrder+1] = temp$bic
}
}
[1] 0
[1] 0
[1] -1237.047
[1] -1384.464
[1] 0
[1] 1
[1] -1334.733
[1] -1482.15
[1] 0
[1] 2
[1] -1332.314
[1] -1479.731
[1] 0
[1] 3
[1] -1326.776
[1] -1474.193
[1] 0
[1] 4
[1] -1326.1
[1] -1473.517
[1] 1
[1] 0
[1] -1285.445
[1] -1432.862
[1] 1
[1] 1
[1] -1332.206
[1] -1479.623
[1] 1
[1] 2
[1] -1330.254
[1] -1477.671
[1] 1
[1] 3
[1] -1324.617
[1] -1472.034
[1] 1
[1] 4
[1] -1321.264
[1] -1468.681
[1] 2
[1] 0
[1] -1314.956
[1] -1462.373
[1] 2
[1] 1
[1] -1326.542
[1] -1473.959
[1] 2
[1] 2
[1] -1324.631
[1] -1472.048
[1] 2
[1] 3
[1] -1328.438
[1] -1475.855
[1] 2
[1] 4
[1] -1315.749
[1] -1463.166
[1] 3
[1] 0
[1] -1312.403
[1] -1459.82
[1] 3
[1] 1
[1] -1323.729
[1] -1471.146
[1] 3
[1] 2
[1] -1321.328
[1] -1468.745
[1] 3
[1] 3
[1] -1337.453
[1] -1484.87
[1] 3
[1] 4
[1] -1321.816
[1] -1469.233
[1] 4
[1] 0
[1] -1312.918
[1] -1460.335
[1] 4
[1] 1
[1] -1319.434
[1] -1466.851
[1] 4
[1] 2
[1] -1329.688
[1] -1477.105
[1] 4
[1] 3
[1] -1336.848
[1] -1484.264
[1] 4
[1] 4
[1] -1326.605
[1] -1474.022
which(matrixBIC==min(matrixBIC), arr.ind = TRUE)
row col
[1,] 4 4
which(matrixAIC==min(matrixAIC), arr.ind = TRUE)
row col
[1,] 5 4
A lower BIC with the SARIMA model, which is not surprising as the AC and PAC still showed high seasonality with lag 12. A model SARIMA(0,0,1)(2,1,1)[12] is suggested by Auto Arima. We will use the SARIMA model also in the later steps to account for the seasonality as the BIC is lower: -1403.98.
modelretailsales <- forecast::auto.arima(ts_ts(data$df_Retail_sales),
ic="bic",
xreg = pandemicDummies["2000-02-01/2024-03-01"],
max.p = 4,
max.q = 4,
trace = TRUE,
stepwise = FALSE)
Fitting models using approximations to speed things up...
Regression with ARIMA(0,0,0)(0,1,0)[12] errors : -1165.699
Regression with ARIMA(0,0,0)(0,1,0)[12] errors : -1160.084
Regression with ARIMA(0,0,0)(0,1,1)[12] errors : -1199.317
Regression with ARIMA(0,0,0)(0,1,1)[12] errors : -1193.737
Regression with ARIMA(0,0,0)(0,1,2)[12] errors : -1195.197
Regression with ARIMA(0,0,0)(0,1,2)[12] errors : -1189.62
Regression with ARIMA(0,0,0)(1,1,0)[12] errors : -1192.165
Regression with ARIMA(0,0,0)(1,1,0)[12] errors : -1186.557
Regression with ARIMA(0,0,0)(1,1,1)[12] errors : -1192.29
Regression with ARIMA(0,0,0)(1,1,1)[12] errors : -1186.684
Regression with ARIMA(0,0,0)(1,1,2)[12] errors : -1190.37
Regression with ARIMA(0,0,0)(1,1,2)[12] errors : -1184.774
Regression with ARIMA(0,0,0)(2,1,0)[12] errors : -1192.225
Regression with ARIMA(0,0,0)(2,1,0)[12] errors : -1186.609
Regression with ARIMA(0,0,0)(2,1,1)[12] errors : -1198.246
Regression with ARIMA(0,0,0)(2,1,1)[12] errors : -1192.63
Regression with ARIMA(0,0,0)(2,1,2)[12] errors : -1192.662
Regression with ARIMA(0,0,0)(2,1,2)[12] errors : -1187.045
Regression with ARIMA(0,0,1)(0,1,0)[12] errors : -1292.629
Regression with ARIMA(0,0,1)(0,1,0)[12] errors : -1287.25
Regression with ARIMA(0,0,1)(0,1,1)[12] errors : -1319.249
Regression with ARIMA(0,0,1)(0,1,1)[12] errors : -1314.206
Regression with ARIMA(0,0,1)(0,1,2)[12] errors : -1314.363
Regression with ARIMA(0,0,1)(0,1,2)[12] errors : -1309.361
Regression with ARIMA(0,0,1)(1,1,0)[12] errors : -1314.58
Regression with ARIMA(0,0,1)(1,1,0)[12] errors : -1309.197
Regression with ARIMA(0,0,1)(1,1,1)[12] errors : -1316.093
Regression with ARIMA(0,0,1)(1,1,1)[12] errors : -1310.703
Regression with ARIMA(0,0,1)(1,1,2)[12] errors : -1311.075
Regression with ARIMA(0,0,1)(1,1,2)[12] errors : -1305.735
Regression with ARIMA(0,0,1)(2,1,0)[12] errors : -1316.705
Regression with ARIMA(0,0,1)(2,1,0)[12] errors : -1311.188
Regression with ARIMA(0,0,1)(2,1,1)[12] errors : -1321.321
Regression with ARIMA(0,0,1)(2,1,1)[12] errors : -1315.86
Regression with ARIMA(0,0,1)(2,1,2)[12] errors : -1315.736
Regression with ARIMA(0,0,1)(2,1,2)[12] errors : -1310.275
Regression with ARIMA(0,0,2)(0,1,0)[12] errors : -1291.643
Regression with ARIMA(0,0,2)(0,1,0)[12] errors : -1286.174
Regression with ARIMA(0,0,2)(0,1,1)[12] errors : -1316.648
Regression with ARIMA(0,0,2)(0,1,1)[12] errors : -1311.452
Regression with ARIMA(0,0,2)(0,1,2)[12] errors : -1311.429
Regression with ARIMA(0,0,2)(0,1,2)[12] errors : -1306.258
Regression with ARIMA(0,0,2)(1,1,0)[12] errors : -1313.365
Regression with ARIMA(0,0,2)(1,1,0)[12] errors : -1307.918
Regression with ARIMA(0,0,2)(1,1,1)[12] errors : -1314.274
Regression with ARIMA(0,0,2)(1,1,1)[12] errors : -1308.797
Regression with ARIMA(0,0,2)(1,1,2)[12] errors : -1308.918
Regression with ARIMA(0,0,2)(1,1,2)[12] errors : -1303.471
Regression with ARIMA(0,0,2)(2,1,0)[12] errors : -1314.404
Regression with ARIMA(0,0,2)(2,1,0)[12] errors : -1308.839
Regression with ARIMA(0,0,2)(2,1,1)[12] errors : -1317.902
Regression with ARIMA(0,0,2)(2,1,1)[12] errors : -1312.371
Regression with ARIMA(0,0,3)(0,1,0)[12] errors : -1287.586
Regression with ARIMA(0,0,3)(0,1,0)[12] errors : -1282.077
Regression with ARIMA(0,0,3)(0,1,1)[12] errors : -1312.299
Regression with ARIMA(0,0,3)(0,1,1)[12] errors : -1307.014
Regression with ARIMA(0,0,3)(0,1,2)[12] errors : -1306.989
Regression with ARIMA(0,0,3)(0,1,2)[12] errors : -1301.723
Regression with ARIMA(0,0,3)(1,1,0)[12] errors : -1309.465
Regression with ARIMA(0,0,3)(1,1,0)[12] errors : -1303.983
Regression with ARIMA(0,0,3)(1,1,1)[12] errors : -1309.945
Regression with ARIMA(0,0,3)(1,1,1)[12] errors : -1304.431
Regression with ARIMA(0,0,3)(2,1,0)[12] errors : -1309.76
Regression with ARIMA(0,0,3)(2,1,0)[12] errors : -1304.175
Regression with ARIMA(0,0,4)(0,1,0)[12] errors : -1284.462
Regression with ARIMA(0,0,4)(0,1,0)[12] errors : -1279.048
Regression with ARIMA(0,0,4)(0,1,1)[12] errors : -1308.025
Regression with ARIMA(0,0,4)(0,1,1)[12] errors : -1302.835
Regression with ARIMA(0,0,4)(1,1,0)[12] errors : -1305.582
Regression with ARIMA(0,0,4)(1,1,0)[12] errors : -1300.14
Regression with ARIMA(1,0,0)(0,1,0)[12] errors : -1244.186
Regression with ARIMA(1,0,0)(0,1,0)[12] errors : -1238.592
Regression with ARIMA(1,0,0)(0,1,1)[12] errors : -1273.124
Regression with ARIMA(1,0,0)(0,1,1)[12] errors : -1267.586
Regression with ARIMA(1,0,0)(0,1,2)[12] errors : -1268.134
Regression with ARIMA(1,0,0)(0,1,2)[12] errors : -1262.598
Regression with ARIMA(1,0,0)(1,1,0)[12] errors : -1269.709
Regression with ARIMA(1,0,0)(1,1,0)[12] errors : -1264.122
Regression with ARIMA(1,0,0)(1,1,1)[12] errors : -1268.933
Regression with ARIMA(1,0,0)(1,1,1)[12] errors : -1263.336
Regression with ARIMA(1,0,0)(1,1,2)[12] errors : -1265.303
Regression with ARIMA(1,0,0)(1,1,2)[12] errors : -1259.722
Regression with ARIMA(1,0,0)(2,1,0)[12] errors : -1271.303
Regression with ARIMA(1,0,0)(2,1,0)[12] errors : -1265.681
Regression with ARIMA(1,0,0)(2,1,1)[12] errors : -1274.692
Regression with ARIMA(1,0,0)(2,1,1)[12] errors : -1269.066
Regression with ARIMA(1,0,0)(2,1,2)[12] errors : -1269.065
Regression with ARIMA(1,0,0)(2,1,2)[12] errors : -1263.439
Regression with ARIMA(1,0,1)(0,1,0)[12] errors : -1290.104
Regression with ARIMA(1,0,1)(0,1,0)[12] errors : -1284.632
Regression with ARIMA(1,0,1)(0,1,1)[12] errors : -1316.296
Regression with ARIMA(1,0,1)(0,1,1)[12] errors : -1311.075
Regression with ARIMA(1,0,1)(0,1,2)[12] errors : -1311.126
Regression with ARIMA(1,0,1)(0,1,2)[12] errors : -1305.926
Regression with ARIMA(1,0,1)(1,1,0)[12] errors : -1313.235
Regression with ARIMA(1,0,1)(1,1,0)[12] errors : -1307.759
Regression with ARIMA(1,0,1)(1,1,1)[12] errors : -1313.265
Regression with ARIMA(1,0,1)(1,1,1)[12] errors : -1307.76
Regression with ARIMA(1,0,1)(1,1,2)[12] errors : -1308.308
Regression with ARIMA(1,0,1)(1,1,2)[12] errors : -1302.844
Regression with ARIMA(1,0,1)(2,1,0)[12] errors : -1316.582
Regression with ARIMA(1,0,1)(2,1,0)[12] errors : -1310.971
Regression with ARIMA(1,0,1)(2,1,1)[12] errors : -1315.361
Regression with ARIMA(1,0,1)(2,1,1)[12] errors : -1309.741
Regression with ARIMA(1,0,2)(0,1,0)[12] errors : -1286.813
Regression with ARIMA(1,0,2)(0,1,0)[12] errors : -1281.266
Regression with ARIMA(1,0,2)(0,1,1)[12] errors : -1312.485
Regression with ARIMA(1,0,2)(0,1,1)[12] errors : -1307.117
Regression with ARIMA(1,0,2)(0,1,2)[12] errors : -1307.136
Regression with ARIMA(1,0,2)(0,1,2)[12] errors : -1301.783
Regression with ARIMA(1,0,2)(1,1,0)[12] errors : -1310.472
Regression with ARIMA(1,0,2)(1,1,0)[12] errors : -1304.916
Regression with ARIMA(1,0,2)(1,1,1)[12] errors : -1309.195
Regression with ARIMA(1,0,2)(1,1,1)[12] errors : -1303.636
Regression with ARIMA(1,0,2)(2,1,0)[12] errors : -1311.459
Regression with ARIMA(1,0,2)(2,1,0)[12] errors : -1305.837
Regression with ARIMA(1,0,3)(0,1,0)[12] errors : -1282.349
Regression with ARIMA(1,0,3)(0,1,0)[12] errors : -1276.833
Regression with ARIMA(1,0,3)(0,1,1)[12] errors : -1307.316
Regression with ARIMA(1,0,3)(0,1,1)[12] errors : -1301.988
Regression with ARIMA(1,0,3)(1,1,0)[12] errors : -1304.841
Regression with ARIMA(1,0,3)(1,1,0)[12] errors : -1299.32
Regression with ARIMA(1,0,4)(0,1,0)[12] errors : -1285.071
Regression with ARIMA(1,0,4)(0,1,0)[12] errors : -1279.594
Regression with ARIMA(2,0,0)(0,1,0)[12] errors : -1283.537
Regression with ARIMA(2,0,0)(0,1,0)[12] errors : -1277.99
Regression with ARIMA(2,0,0)(0,1,1)[12] errors : -1307.619
Regression with ARIMA(2,0,0)(0,1,1)[12] errors : -1302.184
Regression with ARIMA(2,0,0)(0,1,2)[12] errors : -1302.361
Regression with ARIMA(2,0,0)(0,1,2)[12] errors : -1296.928
Regression with ARIMA(2,0,0)(1,1,0)[12] errors : -1304.688
Regression with ARIMA(2,0,0)(1,1,0)[12] errors : -1299.157
Regression with ARIMA(2,0,0)(1,1,1)[12] errors : -1307.72
Regression with ARIMA(2,0,0)(1,1,1)[12] errors : -1302.156
Regression with ARIMA(2,0,0)(1,1,2)[12] errors : -1302.129
Regression with ARIMA(2,0,0)(1,1,2)[12] errors : -1296.571
Regression with ARIMA(2,0,0)(2,1,0)[12] errors : -1308.008
Regression with ARIMA(2,0,0)(2,1,0)[12] errors : -1302.384
Regression with ARIMA(2,0,0)(2,1,1)[12] errors : -1307.954
Regression with ARIMA(2,0,0)(2,1,1)[12] errors : -1302.326
Regression with ARIMA(2,0,1)(0,1,0)[12] errors : -1287.616
Regression with ARIMA(2,0,1)(0,1,0)[12] errors : -1282.099
Regression with ARIMA(2,0,1)(0,1,1)[12] errors : -1311.621
Regression with ARIMA(2,0,1)(0,1,1)[12] errors : -1306.304
Regression with ARIMA(2,0,1)(0,1,2)[12] errors : -1306.288
Regression with ARIMA(2,0,1)(0,1,2)[12] errors : -1300.984
Regression with ARIMA(2,0,1)(1,1,0)[12] errors : -1308.739
Regression with ARIMA(2,0,1)(1,1,0)[12] errors : -1303.237
Regression with ARIMA(2,0,1)(1,1,1)[12] errors : -1310.394
Regression with ARIMA(2,0,1)(1,1,1)[12] errors : -1304.873
Regression with ARIMA(2,0,1)(2,1,0)[12] errors : -1313.485
Regression with ARIMA(2,0,1)(2,1,0)[12] errors : -1307.866
Regression with ARIMA(2,0,2)(0,1,0)[12] errors : -1282.018
Regression with ARIMA(2,0,2)(0,1,0)[12] errors : -1276.496
Regression with ARIMA(2,0,2)(0,1,1)[12] errors : -1306.123
Regression with ARIMA(2,0,2)(0,1,1)[12] errors : -1300.832
Regression with ARIMA(2,0,2)(1,1,0)[12] errors : -1303.16
Regression with ARIMA(2,0,2)(1,1,0)[12] errors : -1297.654
Regression with ARIMA(2,0,3)(0,1,0)[12] errors : -1283.022
Regression with ARIMA(2,0,3)(0,1,0)[12] errors : -1277.578
Regression with ARIMA(3,0,0)(0,1,0)[12] errors : -1292.77
Regression with ARIMA(3,0,0)(0,1,0)[12] errors : -1287.188
Regression with ARIMA(3,0,0)(0,1,1)[12] errors : -1317.838
Regression with ARIMA(3,0,0)(0,1,1)[12] errors : -1312.338
Regression with ARIMA(3,0,0)(0,1,2)[12] errors : -1312.225
Regression with ARIMA(3,0,0)(0,1,2)[12] errors : -1306.726
Regression with ARIMA(3,0,0)(1,1,0)[12] errors : -1313.797
Regression with ARIMA(3,0,0)(1,1,0)[12] errors : -1308.246
Regression with ARIMA(3,0,0)(1,1,1)[12] errors : -1310.192
Regression with ARIMA(3,0,0)(1,1,1)[12] errors : -1304.627
Regression with ARIMA(3,0,0)(2,1,0)[12] errors : -1314.559
Regression with ARIMA(3,0,0)(2,1,0)[12] errors : -1308.941
Regression with ARIMA(3,0,1)(0,1,0)[12] errors : -1287.26
Regression with ARIMA(3,0,1)(0,1,0)[12] errors : -1281.676
Regression with ARIMA(3,0,1)(0,1,1)[12] errors : -1313.767
Regression with ARIMA(3,0,1)(0,1,1)[12] errors : -1308.255
Regression with ARIMA(3,0,1)(1,1,0)[12] errors : -1311.472
Regression with ARIMA(3,0,1)(1,1,0)[12] errors : -1305.854
Regression with ARIMA(3,0,2)(0,1,0)[12] errors : -1281.844
Regression with ARIMA(3,0,2)(0,1,0)[12] errors : -1276.253
Regression with ARIMA(4,0,0)(0,1,0)[12] errors : -1286.682
Regression with ARIMA(4,0,0)(0,1,0)[12] errors : -1281.083
Regression with ARIMA(4,0,0)(0,1,1)[12] errors : -1312.866
Regression with ARIMA(4,0,0)(0,1,1)[12] errors : -1307.335
Regression with ARIMA(4,0,0)(1,1,0)[12] errors : -1310.272
Regression with ARIMA(4,0,0)(1,1,0)[12] errors : -1304.676
Regression with ARIMA(4,0,1)(0,1,0)[12] errors : -1282.119
Regression with ARIMA(4,0,1)(0,1,0)[12] errors : -1276.519
Now re-fitting the best model(s) without approximations...
Best model: Regression with ARIMA(0,0,1)(2,1,1)[12] errors
We generate the forecast for the next 12 months based on the SARIMA(0,0,1)(1,0,1)[12] model.
monthlyDummiesForecast <- forecast::seasonaldummy(ts_ts(data$Retail_sales), 12)
forecastretail <- forecast::forecast(modelretailsales,
xreg = pandemicDummies["2024-04-01/2025-03-01"])
par(mfrow = c(1, 1))
plot(forecastretail, main = "Exclusive pandemic: SARIMA(0,0,1)(1,0,1)")
grid(nx = NULL, ny = NULL, lty = 3, col = "gray", lwd = 0.1)
Explore the CCF Plot for different candidates for the exogenous variable.Cross-correlation only found for Retail EU (seasonally adjusted) - nothing for CHFEUR, Inflation, Brent_COIL or Unemployment. We will assess if model can be improved by including Retail EU sales as exogenous variable.
ccf(as.ts(data$Retail_sales_cycle["/2019-12-31"]),as.ts(data$Retail_EU_cycle["/2019-12-31"]))
ccf(as.ts(data$Retail_sales_cycle["/2019-12-31"]),as.ts(data$df_CHFEUR["/2019-12-31"]))
ccf(as.ts(data$Retail_sales_cycle["/2019-12-31"]),as.ts(data$df_Inflation["/2019-12-31"]))
ccf(as.ts(data$Retail_sales_cycle["/2019-12-31"]),as.ts(data$df_Brent_COIL["/2019-12-31"]))
ccf(as.ts(data$Retail_sales_cycle["/2019-12-31"]),as.ts(data$df_Unemploy["/2019-12-31"]))
We double check the findings by modeling all the combinations and the related BIC values. Results: Univariate -1403.98 Multivariate Retail EU -1429.2 Retail EU with 1 lag -1418.18 CHF/EUR -1401.32 Retail EU AND CHF/EUR -1425.24
Model with Retail EU (Lag 0) with lowest BIC and significant coefficient. Combined Retail EU and CHF/EUR with significant coefficient for CHF/EUR but no improvement in BIC. We decided to not include it in the forecast model because only low significance and we prefer a simple model.
forecast::auto.arima(ts_ts(data$df_Retail_sales),
ic="bic",
xreg = pandemicDummies["2000-02-01/2024-03-01"],
max.d = 0,
trace = TRUE,
stepwise = FALSE)
Fitting models using approximations to speed things up...
Regression with ARIMA(0,0,0)(0,1,0)[12] errors : -1165.699
Regression with ARIMA(0,0,0)(0,1,0)[12] errors : -1160.084
Regression with ARIMA(0,0,0)(0,1,1)[12] errors : -1199.317
Regression with ARIMA(0,0,0)(0,1,1)[12] errors : -1193.737
Regression with ARIMA(0,0,0)(0,1,2)[12] errors : -1195.197
Regression with ARIMA(0,0,0)(0,1,2)[12] errors : -1189.62
Regression with ARIMA(0,0,0)(1,1,0)[12] errors : -1192.165
Regression with ARIMA(0,0,0)(1,1,0)[12] errors : -1186.557
Regression with ARIMA(0,0,0)(1,1,1)[12] errors : -1192.29
Regression with ARIMA(0,0,0)(1,1,1)[12] errors : -1186.684
Regression with ARIMA(0,0,0)(1,1,2)[12] errors : -1190.37
Regression with ARIMA(0,0,0)(1,1,2)[12] errors : -1184.774
Regression with ARIMA(0,0,0)(2,1,0)[12] errors : -1192.225
Regression with ARIMA(0,0,0)(2,1,0)[12] errors : -1186.609
Regression with ARIMA(0,0,0)(2,1,1)[12] errors : -1198.246
Regression with ARIMA(0,0,0)(2,1,1)[12] errors : -1192.63
Regression with ARIMA(0,0,0)(2,1,2)[12] errors : -1192.662
Regression with ARIMA(0,0,0)(2,1,2)[12] errors : -1187.045
Regression with ARIMA(0,0,1)(0,1,0)[12] errors : -1292.629
Regression with ARIMA(0,0,1)(0,1,0)[12] errors : -1287.25
Regression with ARIMA(0,0,1)(0,1,1)[12] errors : -1319.249
Regression with ARIMA(0,0,1)(0,1,1)[12] errors : -1314.206
Regression with ARIMA(0,0,1)(0,1,2)[12] errors : -1314.363
Regression with ARIMA(0,0,1)(0,1,2)[12] errors : -1309.361
Regression with ARIMA(0,0,1)(1,1,0)[12] errors : -1314.58
Regression with ARIMA(0,0,1)(1,1,0)[12] errors : -1309.197
Regression with ARIMA(0,0,1)(1,1,1)[12] errors : -1316.093
Regression with ARIMA(0,0,1)(1,1,1)[12] errors : -1310.703
Regression with ARIMA(0,0,1)(1,1,2)[12] errors : -1311.075
Regression with ARIMA(0,0,1)(1,1,2)[12] errors : -1305.735
Regression with ARIMA(0,0,1)(2,1,0)[12] errors : -1316.705
Regression with ARIMA(0,0,1)(2,1,0)[12] errors : -1311.188
Regression with ARIMA(0,0,1)(2,1,1)[12] errors : -1321.321
Regression with ARIMA(0,0,1)(2,1,1)[12] errors : -1315.86
Regression with ARIMA(0,0,1)(2,1,2)[12] errors : -1315.736
Regression with ARIMA(0,0,1)(2,1,2)[12] errors : -1310.275
Regression with ARIMA(0,0,2)(0,1,0)[12] errors : -1291.643
Regression with ARIMA(0,0,2)(0,1,0)[12] errors : -1286.174
Regression with ARIMA(0,0,2)(0,1,1)[12] errors : -1316.648
Regression with ARIMA(0,0,2)(0,1,1)[12] errors : -1311.452
Regression with ARIMA(0,0,2)(0,1,2)[12] errors : -1311.429
Regression with ARIMA(0,0,2)(0,1,2)[12] errors : -1306.258
Regression with ARIMA(0,0,2)(1,1,0)[12] errors : -1313.365
Regression with ARIMA(0,0,2)(1,1,0)[12] errors : -1307.918
Regression with ARIMA(0,0,2)(1,1,1)[12] errors : -1314.274
Regression with ARIMA(0,0,2)(1,1,1)[12] errors : -1308.797
Regression with ARIMA(0,0,2)(1,1,2)[12] errors : -1308.918
Regression with ARIMA(0,0,2)(1,1,2)[12] errors : -1303.471
Regression with ARIMA(0,0,2)(2,1,0)[12] errors : -1314.404
Regression with ARIMA(0,0,2)(2,1,0)[12] errors : -1308.839
Regression with ARIMA(0,0,2)(2,1,1)[12] errors : -1317.902
Regression with ARIMA(0,0,2)(2,1,1)[12] errors : -1312.371
Regression with ARIMA(0,0,3)(0,1,0)[12] errors : -1287.586
Regression with ARIMA(0,0,3)(0,1,0)[12] errors : -1282.077
Regression with ARIMA(0,0,3)(0,1,1)[12] errors : -1312.299
Regression with ARIMA(0,0,3)(0,1,1)[12] errors : -1307.014
Regression with ARIMA(0,0,3)(0,1,2)[12] errors : -1306.989
Regression with ARIMA(0,0,3)(0,1,2)[12] errors : -1301.723
Regression with ARIMA(0,0,3)(1,1,0)[12] errors : -1309.465
Regression with ARIMA(0,0,3)(1,1,0)[12] errors : -1303.983
Regression with ARIMA(0,0,3)(1,1,1)[12] errors : -1309.945
Regression with ARIMA(0,0,3)(1,1,1)[12] errors : -1304.431
Regression with ARIMA(0,0,3)(2,1,0)[12] errors : -1309.76
Regression with ARIMA(0,0,3)(2,1,0)[12] errors : -1304.175
Regression with ARIMA(0,0,4)(0,1,0)[12] errors : -1284.462
Regression with ARIMA(0,0,4)(0,1,0)[12] errors : -1279.048
Regression with ARIMA(0,0,4)(0,1,1)[12] errors : -1308.025
Regression with ARIMA(0,0,4)(0,1,1)[12] errors : -1302.835
Regression with ARIMA(0,0,4)(1,1,0)[12] errors : -1305.582
Regression with ARIMA(0,0,4)(1,1,0)[12] errors : -1300.14
Regression with ARIMA(0,0,5)(0,1,0)[12] errors : -1280.486
Regression with ARIMA(0,0,5)(0,1,0)[12] errors : -1275.18
Regression with ARIMA(1,0,0)(0,1,0)[12] errors : -1244.186
Regression with ARIMA(1,0,0)(0,1,0)[12] errors : -1238.592
Regression with ARIMA(1,0,0)(0,1,1)[12] errors : -1273.124
Regression with ARIMA(1,0,0)(0,1,1)[12] errors : -1267.586
Regression with ARIMA(1,0,0)(0,1,2)[12] errors : -1268.134
Regression with ARIMA(1,0,0)(0,1,2)[12] errors : -1262.598
Regression with ARIMA(1,0,0)(1,1,0)[12] errors : -1269.709
Regression with ARIMA(1,0,0)(1,1,0)[12] errors : -1264.122
Regression with ARIMA(1,0,0)(1,1,1)[12] errors : -1268.933
Regression with ARIMA(1,0,0)(1,1,1)[12] errors : -1263.336
Regression with ARIMA(1,0,0)(1,1,2)[12] errors : -1265.303
Regression with ARIMA(1,0,0)(1,1,2)[12] errors : -1259.722
Regression with ARIMA(1,0,0)(2,1,0)[12] errors : -1271.303
Regression with ARIMA(1,0,0)(2,1,0)[12] errors : -1265.681
Regression with ARIMA(1,0,0)(2,1,1)[12] errors : -1274.692
Regression with ARIMA(1,0,0)(2,1,1)[12] errors : -1269.066
Regression with ARIMA(1,0,0)(2,1,2)[12] errors : -1269.065
Regression with ARIMA(1,0,0)(2,1,2)[12] errors : -1263.439
Regression with ARIMA(1,0,1)(0,1,0)[12] errors : -1290.104
Regression with ARIMA(1,0,1)(0,1,0)[12] errors : -1284.632
Regression with ARIMA(1,0,1)(0,1,1)[12] errors : -1316.296
Regression with ARIMA(1,0,1)(0,1,1)[12] errors : -1311.075
Regression with ARIMA(1,0,1)(0,1,2)[12] errors : -1311.126
Regression with ARIMA(1,0,1)(0,1,2)[12] errors : -1305.926
Regression with ARIMA(1,0,1)(1,1,0)[12] errors : -1313.235
Regression with ARIMA(1,0,1)(1,1,0)[12] errors : -1307.759
Regression with ARIMA(1,0,1)(1,1,1)[12] errors : -1313.265
Regression with ARIMA(1,0,1)(1,1,1)[12] errors : -1307.76
Regression with ARIMA(1,0,1)(1,1,2)[12] errors : -1308.308
Regression with ARIMA(1,0,1)(1,1,2)[12] errors : -1302.844
Regression with ARIMA(1,0,1)(2,1,0)[12] errors : -1316.582
Regression with ARIMA(1,0,1)(2,1,0)[12] errors : -1310.971
Regression with ARIMA(1,0,1)(2,1,1)[12] errors : -1315.361
Regression with ARIMA(1,0,1)(2,1,1)[12] errors : -1309.741
Regression with ARIMA(1,0,2)(0,1,0)[12] errors : -1286.813
Regression with ARIMA(1,0,2)(0,1,0)[12] errors : -1281.266
Regression with ARIMA(1,0,2)(0,1,1)[12] errors : -1312.485
Regression with ARIMA(1,0,2)(0,1,1)[12] errors : -1307.117
Regression with ARIMA(1,0,2)(0,1,2)[12] errors : -1307.136
Regression with ARIMA(1,0,2)(0,1,2)[12] errors : -1301.783
Regression with ARIMA(1,0,2)(1,1,0)[12] errors : -1310.472
Regression with ARIMA(1,0,2)(1,1,0)[12] errors : -1304.916
Regression with ARIMA(1,0,2)(1,1,1)[12] errors : -1309.195
Regression with ARIMA(1,0,2)(1,1,1)[12] errors : -1303.636
Regression with ARIMA(1,0,2)(2,1,0)[12] errors : -1311.459
Regression with ARIMA(1,0,2)(2,1,0)[12] errors : -1305.837
Regression with ARIMA(1,0,3)(0,1,0)[12] errors : -1282.349
Regression with ARIMA(1,0,3)(0,1,0)[12] errors : -1276.833
Regression with ARIMA(1,0,3)(0,1,1)[12] errors : -1307.316
Regression with ARIMA(1,0,3)(0,1,1)[12] errors : -1301.988
Regression with ARIMA(1,0,3)(1,1,0)[12] errors : -1304.841
Regression with ARIMA(1,0,3)(1,1,0)[12] errors : -1299.32
Regression with ARIMA(1,0,4)(0,1,0)[12] errors : -1285.071
Regression with ARIMA(1,0,4)(0,1,0)[12] errors : -1279.594
Regression with ARIMA(2,0,0)(0,1,0)[12] errors : -1283.537
Regression with ARIMA(2,0,0)(0,1,0)[12] errors : -1277.99
Regression with ARIMA(2,0,0)(0,1,1)[12] errors : -1307.619
Regression with ARIMA(2,0,0)(0,1,1)[12] errors : -1302.184
Regression with ARIMA(2,0,0)(0,1,2)[12] errors : -1302.361
Regression with ARIMA(2,0,0)(0,1,2)[12] errors : -1296.928
Regression with ARIMA(2,0,0)(1,1,0)[12] errors : -1304.688
Regression with ARIMA(2,0,0)(1,1,0)[12] errors : -1299.157
Regression with ARIMA(2,0,0)(1,1,1)[12] errors : -1307.72
Regression with ARIMA(2,0,0)(1,1,1)[12] errors : -1302.156
Regression with ARIMA(2,0,0)(1,1,2)[12] errors : -1302.129
Regression with ARIMA(2,0,0)(1,1,2)[12] errors : -1296.571
Regression with ARIMA(2,0,0)(2,1,0)[12] errors : -1308.008
Regression with ARIMA(2,0,0)(2,1,0)[12] errors : -1302.384
Regression with ARIMA(2,0,0)(2,1,1)[12] errors : -1307.954
Regression with ARIMA(2,0,0)(2,1,1)[12] errors : -1302.326
Regression with ARIMA(2,0,1)(0,1,0)[12] errors : -1287.616
Regression with ARIMA(2,0,1)(0,1,0)[12] errors : -1282.099
Regression with ARIMA(2,0,1)(0,1,1)[12] errors : -1311.621
Regression with ARIMA(2,0,1)(0,1,1)[12] errors : -1306.304
Regression with ARIMA(2,0,1)(0,1,2)[12] errors : -1306.288
Regression with ARIMA(2,0,1)(0,1,2)[12] errors : -1300.984
Regression with ARIMA(2,0,1)(1,1,0)[12] errors : -1308.739
Regression with ARIMA(2,0,1)(1,1,0)[12] errors : -1303.237
Regression with ARIMA(2,0,1)(1,1,1)[12] errors : -1310.394
Regression with ARIMA(2,0,1)(1,1,1)[12] errors : -1304.873
Regression with ARIMA(2,0,1)(2,1,0)[12] errors : -1313.485
Regression with ARIMA(2,0,1)(2,1,0)[12] errors : -1307.866
Regression with ARIMA(2,0,2)(0,1,0)[12] errors : -1282.018
Regression with ARIMA(2,0,2)(0,1,0)[12] errors : -1276.496
Regression with ARIMA(2,0,2)(0,1,1)[12] errors : -1306.123
Regression with ARIMA(2,0,2)(0,1,1)[12] errors : -1300.832
Regression with ARIMA(2,0,2)(1,1,0)[12] errors : -1303.16
Regression with ARIMA(2,0,2)(1,1,0)[12] errors : -1297.654
Regression with ARIMA(2,0,3)(0,1,0)[12] errors : -1283.022
Regression with ARIMA(2,0,3)(0,1,0)[12] errors : -1277.578
Regression with ARIMA(3,0,0)(0,1,0)[12] errors : -1292.77
Regression with ARIMA(3,0,0)(0,1,0)[12] errors : -1287.188
Regression with ARIMA(3,0,0)(0,1,1)[12] errors : -1317.838
Regression with ARIMA(3,0,0)(0,1,1)[12] errors : -1312.338
Regression with ARIMA(3,0,0)(0,1,2)[12] errors : -1312.225
Regression with ARIMA(3,0,0)(0,1,2)[12] errors : -1306.726
Regression with ARIMA(3,0,0)(1,1,0)[12] errors : -1313.797
Regression with ARIMA(3,0,0)(1,1,0)[12] errors : -1308.246
Regression with ARIMA(3,0,0)(1,1,1)[12] errors : -1310.192
Regression with ARIMA(3,0,0)(1,1,1)[12] errors : -1304.627
Regression with ARIMA(3,0,0)(2,1,0)[12] errors : -1314.559
Regression with ARIMA(3,0,0)(2,1,0)[12] errors : -1308.941
Regression with ARIMA(3,0,1)(0,1,0)[12] errors : -1287.26
Regression with ARIMA(3,0,1)(0,1,0)[12] errors : -1281.676
Regression with ARIMA(3,0,1)(0,1,1)[12] errors : -1313.767
Regression with ARIMA(3,0,1)(0,1,1)[12] errors : -1308.255
Regression with ARIMA(3,0,1)(1,1,0)[12] errors : -1311.472
Regression with ARIMA(3,0,1)(1,1,0)[12] errors : -1305.854
Regression with ARIMA(3,0,2)(0,1,0)[12] errors : -1281.844
Regression with ARIMA(3,0,2)(0,1,0)[12] errors : -1276.253
Regression with ARIMA(4,0,0)(0,1,0)[12] errors : -1286.682
Regression with ARIMA(4,0,0)(0,1,0)[12] errors : -1281.083
Regression with ARIMA(4,0,0)(0,1,1)[12] errors : -1312.866
Regression with ARIMA(4,0,0)(0,1,1)[12] errors : -1307.335
Regression with ARIMA(4,0,0)(1,1,0)[12] errors : -1310.272
Regression with ARIMA(4,0,0)(1,1,0)[12] errors : -1304.676
Regression with ARIMA(4,0,1)(0,1,0)[12] errors : -1282.119
Regression with ARIMA(4,0,1)(0,1,0)[12] errors : -1276.519
Regression with ARIMA(5,0,0)(0,1,0)[12] errors : -1282.59
Regression with ARIMA(5,0,0)(0,1,0)[12] errors : -1277.037
Now re-fitting the best model(s) without approximations...
Best model: Regression with ARIMA(0,0,1)(2,1,1)[12] errors
Series: ts_ts(data$df_Retail_sales)
Regression with ARIMA(0,0,1)(2,1,1)[12] errors
Coefficients:
ma1 sar1 sar2 sma1 Series 1 Series 2 Series 3 Series 4 Series 5 Series 6 Series 7 Series 8
-0.7075 0.2028 0.0362 -0.5787 -0.0002 0.0035 -0.0806 -0.1318 0.2678 -0.0242 0.0067 -0.0105
s.e. 0.0415 0.1969 0.1015 0.1863 0.0129 0.0156 0.0156 0.0158 0.0158 0.0157 0.0157 0.0157
Series 9 Series 10 Series 11 Series 12 Series 13 Series 14 Series 15 Series 16 Series 17 Series 18
-0.0174 0.0381 -0.0297 0.0348 -0.0665 -0.0620 0.1984 -0.0107 -0.0371 -0.0365
s.e. 0.0157 0.0157 0.0157 0.0154 0.0154 0.0156 0.0157 0.0157 0.0157 0.0158
Series 19 Series 20 Series 21 Series 22 Series 23 Series 24
-0.0177 0.0146 -0.0017 0.0364 -0.0040 -0.0086
s.e. 0.0158 0.0157 0.0157 0.0157 0.0157 0.0130
sigma^2 = 0.0002296: log likelihood = 783.59
AIC=-1509.18 AICc=-1502.16 BIC=-1403.98
forecast::auto.arima(ts_ts(data$df_Retail_sales),
ic="bic",
xreg = cbind(pandemicDummies["2000-02-01/2024-03-01"],
data$df_Retail_EU),
max.d = 0,
trace = TRUE,
stepwise = FALSE)
Fitting models using approximations to speed things up...
Regression with ARIMA(0,0,0)(0,1,0)[12] errors : -1186.405
Regression with ARIMA(0,0,0)(0,1,0)[12] errors : -1180.785
Regression with ARIMA(0,0,0)(0,1,1)[12] errors : -1221.354
Regression with ARIMA(0,0,0)(0,1,1)[12] errors : -1215.739
Regression with ARIMA(0,0,0)(0,1,2)[12] errors : -1216.148
Regression with ARIMA(0,0,0)(0,1,2)[12] errors : -1210.534
Regression with ARIMA(0,0,0)(1,1,0)[12] errors : -1222.289
Regression with ARIMA(0,0,0)(1,1,0)[12] errors : -1216.676
Regression with ARIMA(0,0,0)(1,1,1)[12] errors : -1221.957
Regression with ARIMA(0,0,0)(1,1,1)[12] errors : -1216.341
Regression with ARIMA(0,0,0)(1,1,2)[12] errors : -1217.901
Regression with ARIMA(0,0,0)(1,1,2)[12] errors : -1212.287
Regression with ARIMA(0,0,0)(2,1,0)[12] errors : -1219.63
Regression with ARIMA(0,0,0)(2,1,0)[12] errors : -1214.003
Regression with ARIMA(0,0,0)(2,1,1)[12] errors : -1219.999
Regression with ARIMA(0,0,0)(2,1,1)[12] errors : -1214.373
Regression with ARIMA(0,0,0)(2,1,2)[12] errors : -1214.476
Regression with ARIMA(0,0,0)(2,1,2)[12] errors : -1208.85
Regression with ARIMA(0,0,1)(0,1,0)[12] errors : -1312.424
Regression with ARIMA(0,0,1)(0,1,0)[12] errors : -1306.889
Regression with ARIMA(0,0,1)(0,1,1)[12] errors : -1341.664
Regression with ARIMA(0,0,1)(0,1,1)[12] errors : -1336.138
Regression with ARIMA(0,0,1)(0,1,2)[12] errors : -1336.24
Regression with ARIMA(0,0,1)(0,1,2)[12] errors : -1330.72
Regression with ARIMA(0,0,1)(1,1,0)[12] errors : -1336.113
Regression with ARIMA(0,0,1)(1,1,0)[12] errors : -1330.565
Regression with ARIMA(0,0,1)(1,1,1)[12] errors : -1336.828
Regression with ARIMA(0,0,1)(1,1,1)[12] errors : -1331.267
Regression with ARIMA(0,0,1)(1,1,2)[12] errors : -1331.487
Regression with ARIMA(0,0,1)(1,1,2)[12] errors : -1325.935
Regression with ARIMA(0,0,1)(2,1,0)[12] errors : -1341.735
Regression with ARIMA(0,0,1)(2,1,0)[12] errors : -1336.11
Regression with ARIMA(0,0,1)(2,1,1)[12] errors : -1341.534
Regression with ARIMA(0,0,1)(2,1,1)[12] errors : -1335.916
Regression with ARIMA(0,0,1)(2,1,2)[12] errors : -1336.256
Regression with ARIMA(0,0,1)(2,1,2)[12] errors : -1330.635
Regression with ARIMA(0,0,2)(0,1,0)[12] errors : -1311.167
Regression with ARIMA(0,0,2)(0,1,0)[12] errors : -1305.599
Regression with ARIMA(0,0,2)(0,1,1)[12] errors : -1339.729
Regression with ARIMA(0,0,2)(0,1,1)[12] errors : -1334.172
Regression with ARIMA(0,0,2)(0,1,2)[12] errors : -1334.136
Regression with ARIMA(0,0,2)(0,1,2)[12] errors : -1328.58
Regression with ARIMA(0,0,2)(1,1,0)[12] errors : -1335.577
Regression with ARIMA(0,0,2)(1,1,0)[12] errors : -1330.019
Regression with ARIMA(0,0,2)(1,1,1)[12] errors : -1336.006
Regression with ARIMA(0,0,2)(1,1,1)[12] errors : -1330.423
Regression with ARIMA(0,0,2)(1,1,2)[12] errors : -1330.405
Regression with ARIMA(0,0,2)(1,1,2)[12] errors : -1324.826
Regression with ARIMA(0,0,2)(2,1,0)[12] errors : -1339.765
Regression with ARIMA(0,0,2)(2,1,0)[12] errors : -1334.142
Regression with ARIMA(0,0,2)(2,1,1)[12] errors : -1339.078
Regression with ARIMA(0,0,2)(2,1,1)[12] errors : -1333.467
Regression with ARIMA(0,0,3)(0,1,0)[12] errors : -1306.639
Regression with ARIMA(0,0,3)(0,1,0)[12] errors : -1301.058
Regression with ARIMA(0,0,3)(0,1,1)[12] errors : -1335.128
Regression with ARIMA(0,0,3)(0,1,1)[12] errors : -1329.558
Regression with ARIMA(0,0,3)(0,1,2)[12] errors : -1329.536
Regression with ARIMA(0,0,3)(0,1,2)[12] errors : -1323.967
Regression with ARIMA(0,0,3)(1,1,0)[12] errors : -1331.933
Regression with ARIMA(0,0,3)(1,1,0)[12] errors : -1326.369
Regression with ARIMA(0,0,3)(1,1,1)[12] errors : -1332.58
Regression with ARIMA(0,0,3)(1,1,1)[12] errors : -1326.987
Regression with ARIMA(0,0,3)(2,1,0)[12] errors : -1335.317
Regression with ARIMA(0,0,3)(2,1,0)[12] errors : -1329.696
Regression with ARIMA(0,0,4)(0,1,0)[12] errors : -1303.797
Regression with ARIMA(0,0,4)(0,1,0)[12] errors : -1298.253
Regression with ARIMA(0,0,4)(0,1,1)[12] errors : -1330.239
Regression with ARIMA(0,0,4)(0,1,1)[12] errors : -1324.684
Regression with ARIMA(0,0,4)(1,1,0)[12] errors : -1327.128
Regression with ARIMA(0,0,4)(1,1,0)[12] errors : -1321.568
Regression with ARIMA(0,0,5)(0,1,0)[12] errors : -1299.658
Regression with ARIMA(0,0,5)(0,1,0)[12] errors : -1294.144
Regression with ARIMA(1,0,0)(0,1,0)[12] errors : -1265.476
Regression with ARIMA(1,0,0)(0,1,0)[12] errors : -1259.862
Regression with ARIMA(1,0,0)(0,1,1)[12] errors : -1298.491
Regression with ARIMA(1,0,0)(0,1,1)[12] errors : -1292.875
Regression with ARIMA(1,0,0)(0,1,2)[12] errors : -1292.886
Regression with ARIMA(1,0,0)(0,1,2)[12] errors : -1287.27
Regression with ARIMA(1,0,0)(1,1,0)[12] errors : -1299.829
Regression with ARIMA(1,0,0)(1,1,0)[12] errors : -1294.212
Regression with ARIMA(1,0,0)(1,1,1)[12] errors : -1298.197
Regression with ARIMA(1,0,0)(1,1,1)[12] errors : -1292.573
Regression with ARIMA(1,0,0)(1,1,2)[12] errors : -1292.848
Regression with ARIMA(1,0,0)(1,1,2)[12] errors : -1287.225
Regression with ARIMA(1,0,0)(2,1,0)[12] errors : -1298.173
Regression with ARIMA(1,0,0)(2,1,0)[12] errors : -1292.556
Regression with ARIMA(1,0,0)(2,1,1)[12] errors : -1294.727
Regression with ARIMA(1,0,0)(2,1,1)[12] errors : -1289.117
Regression with ARIMA(1,0,0)(2,1,2)[12] errors : -1289.169
Regression with ARIMA(1,0,0)(2,1,2)[12] errors : -1283.559
Regression with ARIMA(1,0,1)(0,1,0)[12] errors : -1309.445
Regression with ARIMA(1,0,1)(0,1,0)[12] errors : -1303.873
Regression with ARIMA(1,0,1)(0,1,1)[12] errors : -1338.685
Regression with ARIMA(1,0,1)(0,1,1)[12] errors : -1333.111
Regression with ARIMA(1,0,1)(0,1,2)[12] errors : -1333.106
Regression with ARIMA(1,0,1)(0,1,2)[12] errors : -1327.534
Regression with ARIMA(1,0,1)(1,1,0)[12] errors : -1338.349
Regression with ARIMA(1,0,1)(1,1,0)[12] errors : -1332.737
Regression with ARIMA(1,0,1)(1,1,1)[12] errors : -1337.459
Regression with ARIMA(1,0,1)(1,1,1)[12] errors : -1331.833
Regression with ARIMA(1,0,1)(1,1,2)[12] errors : -1332.12
Regression with ARIMA(1,0,1)(1,1,2)[12] errors : -1326.497
Regression with ARIMA(1,0,1)(2,1,0)[12] errors : -1340.752
Regression with ARIMA(1,0,1)(2,1,0)[12] errors : -1335.173
Regression with ARIMA(1,0,1)(2,1,1)[12] errors : -1336.123
Regression with ARIMA(1,0,1)(2,1,1)[12] errors : -1330.561
Regression with ARIMA(1,0,2)(0,1,0)[12] errors : -1305.582
Regression with ARIMA(1,0,2)(0,1,0)[12] errors : -1299.984
Regression with ARIMA(1,0,2)(0,1,1)[12] errors : -1334.741
Regression with ARIMA(1,0,2)(0,1,1)[12] errors : -1329.14
Regression with ARIMA(1,0,2)(0,1,2)[12] errors : -1329.128
Regression with ARIMA(1,0,2)(0,1,2)[12] errors : -1323.527
Regression with ARIMA(1,0,2)(1,1,0)[12] errors : -1338.046
Regression with ARIMA(1,0,2)(1,1,0)[12] errors : -1332.453
Regression with ARIMA(1,0,2)(1,1,1)[12] errors : -1334.737
Regression with ARIMA(1,0,2)(1,1,1)[12] errors : -1329.14
Regression with ARIMA(1,0,2)(2,1,0)[12] errors : -1335.381
Regression with ARIMA(1,0,2)(2,1,0)[12] errors : -1329.809
Regression with ARIMA(1,0,3)(0,1,0)[12] errors : -1301.068
Regression with ARIMA(1,0,3)(0,1,0)[12] errors : -1295.476
Regression with ARIMA(1,0,3)(0,1,1)[12] errors : -1329.491
Regression with ARIMA(1,0,3)(0,1,1)[12] errors : -1323.904
Regression with ARIMA(1,0,3)(1,1,0)[12] errors : -1334.848
Regression with ARIMA(1,0,3)(1,1,0)[12] errors : -1329.297
Regression with ARIMA(1,0,4)(0,1,0)[12] errors : -1301.224
Regression with ARIMA(1,0,4)(0,1,0)[12] errors : -1295.597
Regression with ARIMA(2,0,0)(0,1,0)[12] errors : -1303.643
Regression with ARIMA(2,0,0)(0,1,0)[12] errors : -1298.05
Regression with ARIMA(2,0,0)(0,1,1)[12] errors : -1330.657
Regression with ARIMA(2,0,0)(0,1,1)[12] errors : -1325.067
Regression with ARIMA(2,0,0)(0,1,2)[12] errors : -1325.053
Regression with ARIMA(2,0,0)(0,1,2)[12] errors : -1319.463
Regression with ARIMA(2,0,0)(1,1,0)[12] errors : -1330.794
Regression with ARIMA(2,0,0)(1,1,0)[12] errors : -1325.196
Regression with ARIMA(2,0,0)(1,1,1)[12] errors : -1332.41
Regression with ARIMA(2,0,0)(1,1,1)[12] errors : -1326.788
Regression with ARIMA(2,0,0)(1,1,2)[12] errors : -1326.782
Regression with ARIMA(2,0,0)(1,1,2)[12] errors : -1321.161
Regression with ARIMA(2,0,0)(2,1,0)[12] errors : -1333.98
Regression with ARIMA(2,0,0)(2,1,0)[12] errors : -1328.384
Regression with ARIMA(2,0,0)(2,1,1)[12] errors : -1329.824
Regression with ARIMA(2,0,0)(2,1,1)[12] errors : -1324.245
Regression with ARIMA(2,0,1)(0,1,0)[12] errors : -1306.409
Regression with ARIMA(2,0,1)(0,1,0)[12] errors : -1300.824
Regression with ARIMA(2,0,1)(0,1,1)[12] errors : -1333.494
Regression with ARIMA(2,0,1)(0,1,1)[12] errors : -1327.923
Regression with ARIMA(2,0,1)(0,1,2)[12] errors : -1327.917
Regression with ARIMA(2,0,1)(0,1,2)[12] errors : -1322.347
Regression with ARIMA(2,0,1)(1,1,0)[12] errors : -1332.714
Regression with ARIMA(2,0,1)(1,1,0)[12] errors : -1327.113
Regression with ARIMA(2,0,1)(1,1,1)[12] errors : -1333.814
Regression with ARIMA(2,0,1)(1,1,1)[12] errors : -1328.196
Regression with ARIMA(2,0,1)(2,1,0)[12] errors : -1338.208
Regression with ARIMA(2,0,1)(2,1,0)[12] errors : -1332.617
Regression with ARIMA(2,0,2)(0,1,0)[12] errors : -1300.783
Regression with ARIMA(2,0,2)(0,1,0)[12] errors : -1295.198
Regression with ARIMA(2,0,2)(0,1,1)[12] errors : -1328.112
Regression with ARIMA(2,0,2)(0,1,1)[12] errors : -1322.546
Regression with ARIMA(2,0,2)(1,1,0)[12] errors : -1327.122
Regression with ARIMA(2,0,2)(1,1,0)[12] errors : -1321.521
Regression with ARIMA(2,0,3)(0,1,0)[12] errors : -1305.589
Regression with ARIMA(2,0,3)(0,1,0)[12] errors : -1300.296
Regression with ARIMA(3,0,0)(0,1,0)[12] errors : -1311.23
Regression with ARIMA(3,0,0)(0,1,0)[12] errors : -1305.612
Regression with ARIMA(3,0,0)(0,1,1)[12] errors : -1339.867
Regression with ARIMA(3,0,0)(0,1,1)[12] errors : -1334.246
Regression with ARIMA(3,0,0)(0,1,2)[12] errors : -1334.299
Regression with ARIMA(3,0,0)(0,1,2)[12] errors : -1328.677
Regression with ARIMA(3,0,0)(1,1,0)[12] errors : -1339.041
Regression with ARIMA(3,0,0)(1,1,0)[12] errors : -1333.42
Regression with ARIMA(3,0,0)(1,1,1)[12] errors : -1334.709
Regression with ARIMA(3,0,0)(1,1,1)[12] errors : -1329.083
Regression with ARIMA(3,0,0)(2,1,0)[12] errors : -1339.28
Regression with ARIMA(3,0,0)(2,1,0)[12] errors : -1333.672
Regression with ARIMA(3,0,1)(0,1,0)[12] errors : -1305.602
Regression with ARIMA(3,0,1)(0,1,0)[12] errors : -1299.985
Regression with ARIMA(3,0,1)(0,1,1)[12] errors : -1335.307
Regression with ARIMA(3,0,1)(0,1,1)[12] errors : -1329.68
Regression with ARIMA(3,0,1)(1,1,0)[12] errors : -1337.655
Regression with ARIMA(3,0,1)(1,1,0)[12] errors : -1332.075
Regression with ARIMA(3,0,2)(0,1,0)[12] errors : -1300.103
Regression with ARIMA(3,0,2)(0,1,0)[12] errors : -1294.485
Regression with ARIMA(4,0,0)(0,1,0)[12] errors : -1304.931
Regression with ARIMA(4,0,0)(0,1,0)[12] errors : -1299.308
Regression with ARIMA(4,0,0)(0,1,1)[12] errors : -1334.141
Regression with ARIMA(4,0,0)(0,1,1)[12] errors : -1328.514
Regression with ARIMA(4,0,0)(1,1,0)[12] errors : -1336.269
Regression with ARIMA(4,0,0)(1,1,0)[12] errors : -1330.643
Regression with ARIMA(4,0,1)(0,1,0)[12] errors : -1299.898
Regression with ARIMA(4,0,1)(0,1,0)[12] errors : -1294.273
Regression with ARIMA(5,0,0)(0,1,0)[12] errors : -1301.005
Regression with ARIMA(5,0,0)(0,1,0)[12] errors : -1295.405
Now re-fitting the best model(s) without approximations...
Best model: Regression with ARIMA(0,0,1)(2,1,0)[12] errors
Series: ts_ts(data$df_Retail_sales)
Regression with ARIMA(0,0,1)(2,1,0)[12] errors
Coefficients:
ma1 sar1 sar2 Series.1 Series.2 Series.3 Series.4 Series.5 Series.6 Series.7 Series.8
-0.6918 -0.3740 -0.1011 -0.0004 -0.0078 -0.1059 -0.1051 0.2543 -0.0090 0.0092 -0.0233
s.e. 0.0406 0.0636 0.0671 0.0119 0.0145 0.0150 0.0155 0.0148 0.0147 0.0145 0.0146
Series.9 Series.10 Series.11 Series.12 Series.13 Series.14 Series.15 Series.16 Series.17 Series.18
-0.0094 0.0243 -0.0229 0.0222 -0.0637 -0.0642 0.1923 -0.0080 -0.0342 -0.0305
s.e. 0.0145 0.0146 0.0145 0.0145 0.0142 0.0144 0.0144 0.0144 0.0144 0.0146
Series.19 Series.20 Series.21 Series.22 Series.23 Series.24 df_Retail_EU
-0.0120 0.0137 -0.0018 0.0286 -0.0068 -0.0101 0.4563
s.e. 0.0145 0.0144 0.0145 0.0145 0.0144 0.0120 0.0834
sigma^2 = 0.00021: log likelihood = 796.2
AIC=-1534.41 AICc=-1527.39 BIC=-1429.2
forecast::auto.arima(ts_ts(data$df_Retail_sales),
ic="bic",
xreg = cbind(pandemicDummies["2000-02-01/2024-03-01"],
data$df_Retail_EU,
lag(data$df_Retail_EU)
),
max.d = 0,
trace = TRUE,
stepwise = FALSE)
Fitting models using approximations to speed things up...
Regression with ARIMA(0,0,0)(0,1,0)[12] errors : -1174.741
Regression with ARIMA(0,0,0)(0,1,0)[12] errors : -1169.119
ARIMA(0,0,0)(0,1,1)[12] : Inf
ARIMA(0,0,0)(0,1,1)[12] with drift : Inf
ARIMA(0,0,0)(0,1,2)[12] : Inf
ARIMA(0,0,0)(0,1,2)[12] with drift : Inf
Regression with ARIMA(0,0,0)(1,1,0)[12] errors : -1212.087
Regression with ARIMA(0,0,0)(1,1,0)[12] errors : -1206.462
ARIMA(0,0,0)(1,1,1)[12] : Inf
ARIMA(0,0,0)(1,1,1)[12] with drift : Inf
ARIMA(0,0,0)(1,1,2)[12] : Inf
ARIMA(0,0,0)(1,1,2)[12] with drift : Inf
Regression with ARIMA(0,0,0)(2,1,0)[12] errors : -1210.4
Regression with ARIMA(0,0,0)(2,1,0)[12] errors : -1204.782
ARIMA(0,0,0)(2,1,1)[12] : Inf
ARIMA(0,0,0)(2,1,1)[12] with drift : Inf
ARIMA(0,0,0)(2,1,2)[12] : Inf
ARIMA(0,0,0)(2,1,2)[12] with drift : Inf
ARIMA(0,0,1)(0,1,0)[12] : Inf
ARIMA(0,0,1)(0,1,0)[12] with drift : Inf
ARIMA(0,0,1)(0,1,1)[12] : Inf
ARIMA(0,0,1)(0,1,1)[12] with drift : Inf
ARIMA(0,0,1)(0,1,2)[12] : Inf
ARIMA(0,0,1)(0,1,2)[12] with drift : Inf
ARIMA(0,0,1)(1,1,0)[12] : Inf
ARIMA(0,0,1)(1,1,0)[12] with drift : Inf
ARIMA(0,0,1)(1,1,1)[12] : Inf
ARIMA(0,0,1)(1,1,1)[12] with drift : Inf
ARIMA(0,0,1)(1,1,2)[12] : Inf
ARIMA(0,0,1)(1,1,2)[12] with drift : Inf
ARIMA(0,0,1)(2,1,0)[12] : Inf
ARIMA(0,0,1)(2,1,0)[12] with drift : Inf
ARIMA(0,0,1)(2,1,1)[12] : Inf
ARIMA(0,0,1)(2,1,1)[12] with drift : Inf
ARIMA(0,0,1)(2,1,2)[12] : Inf
ARIMA(0,0,1)(2,1,2)[12] with drift : Inf
ARIMA(0,0,2)(0,1,0)[12] : Inf
ARIMA(0,0,2)(0,1,0)[12] with drift : Inf
ARIMA(0,0,2)(0,1,1)[12] : Inf
ARIMA(0,0,2)(0,1,1)[12] with drift : Inf
ARIMA(0,0,2)(0,1,2)[12] : Inf
ARIMA(0,0,2)(0,1,2)[12] with drift : Inf
ARIMA(0,0,2)(1,1,0)[12] : Inf
ARIMA(0,0,2)(1,1,0)[12] with drift : Inf
ARIMA(0,0,2)(1,1,1)[12] : Inf
ARIMA(0,0,2)(1,1,1)[12] with drift : Inf
ARIMA(0,0,2)(1,1,2)[12] : Inf
ARIMA(0,0,2)(1,1,2)[12] with drift : Inf
ARIMA(0,0,2)(2,1,0)[12] : Inf
ARIMA(0,0,2)(2,1,0)[12] with drift : Inf
ARIMA(0,0,2)(2,1,1)[12] : Inf
ARIMA(0,0,2)(2,1,1)[12] with drift : Inf
ARIMA(0,0,3)(0,1,0)[12] : Inf
ARIMA(0,0,3)(0,1,0)[12] with drift : Inf
ARIMA(0,0,3)(0,1,1)[12] : Inf
ARIMA(0,0,3)(0,1,1)[12] with drift : Inf
ARIMA(0,0,3)(0,1,2)[12] : Inf
ARIMA(0,0,3)(0,1,2)[12] with drift : Inf
ARIMA(0,0,3)(1,1,0)[12] : Inf
ARIMA(0,0,3)(1,1,0)[12] with drift : Inf
ARIMA(0,0,3)(1,1,1)[12] : Inf
ARIMA(0,0,3)(1,1,1)[12] with drift : Inf
ARIMA(0,0,3)(2,1,0)[12] : Inf
ARIMA(0,0,3)(2,1,0)[12] with drift : Inf
ARIMA(0,0,4)(0,1,0)[12] : Inf
ARIMA(0,0,4)(0,1,0)[12] with drift : Inf
ARIMA(0,0,4)(0,1,1)[12] : Inf
ARIMA(0,0,4)(0,1,1)[12] with drift : Inf
ARIMA(0,0,4)(1,1,0)[12] : Inf
ARIMA(0,0,4)(1,1,0)[12] with drift : Inf
ARIMA(0,0,5)(0,1,0)[12] : Inf
ARIMA(0,0,5)(0,1,0)[12] with drift : Inf
Regression with ARIMA(1,0,0)(0,1,0)[12] errors : -1254.253
Regression with ARIMA(1,0,0)(0,1,0)[12] errors : -1248.641
ARIMA(1,0,0)(0,1,1)[12] : Inf
ARIMA(1,0,0)(0,1,1)[12] with drift : Inf
ARIMA(1,0,0)(0,1,2)[12] : Inf
ARIMA(1,0,0)(0,1,2)[12] with drift : Inf
Regression with ARIMA(1,0,0)(1,1,0)[12] errors : -1288.515
Regression with ARIMA(1,0,0)(1,1,0)[12] errors : -1282.898
ARIMA(1,0,0)(1,1,1)[12] : Inf
ARIMA(1,0,0)(1,1,1)[12] with drift : Inf
ARIMA(1,0,0)(1,1,2)[12] : Inf
ARIMA(1,0,0)(1,1,2)[12] with drift : Inf
Regression with ARIMA(1,0,0)(2,1,0)[12] errors : -1288.118
Regression with ARIMA(1,0,0)(2,1,0)[12] errors : -1282.524
ARIMA(1,0,0)(2,1,1)[12] : Inf
ARIMA(1,0,0)(2,1,1)[12] with drift : Inf
ARIMA(1,0,0)(2,1,2)[12] : Inf
ARIMA(1,0,0)(2,1,2)[12] with drift : Inf
ARIMA(1,0,1)(0,1,0)[12] : Inf
ARIMA(1,0,1)(0,1,0)[12] with drift : Inf
ARIMA(1,0,1)(0,1,1)[12] : Inf
ARIMA(1,0,1)(0,1,1)[12] with drift : Inf
ARIMA(1,0,1)(0,1,2)[12] : Inf
ARIMA(1,0,1)(0,1,2)[12] with drift : Inf
ARIMA(1,0,1)(1,1,0)[12] : Inf
ARIMA(1,0,1)(1,1,0)[12] with drift : Inf
ARIMA(1,0,1)(1,1,1)[12] : Inf
ARIMA(1,0,1)(1,1,1)[12] with drift : Inf
ARIMA(1,0,1)(1,1,2)[12] : Inf
ARIMA(1,0,1)(1,1,2)[12] with drift : Inf
ARIMA(1,0,1)(2,1,0)[12] : Inf
ARIMA(1,0,1)(2,1,0)[12] with drift : Inf
ARIMA(1,0,1)(2,1,1)[12] : Inf
ARIMA(1,0,1)(2,1,1)[12] with drift : Inf
ARIMA(1,0,2)(0,1,0)[12] : Inf
ARIMA(1,0,2)(0,1,0)[12] with drift : Inf
ARIMA(1,0,2)(0,1,1)[12] : Inf
ARIMA(1,0,2)(0,1,1)[12] with drift : Inf
ARIMA(1,0,2)(0,1,2)[12] : Inf
ARIMA(1,0,2)(0,1,2)[12] with drift : Inf
ARIMA(1,0,2)(1,1,0)[12] : Inf
ARIMA(1,0,2)(1,1,0)[12] with drift : Inf
ARIMA(1,0,2)(1,1,1)[12] : Inf
ARIMA(1,0,2)(1,1,1)[12] with drift : Inf
ARIMA(1,0,2)(2,1,0)[12] : Inf
ARIMA(1,0,2)(2,1,0)[12] with drift : Inf
ARIMA(1,0,3)(0,1,0)[12] : Inf
ARIMA(1,0,3)(0,1,0)[12] with drift : Inf
ARIMA(1,0,3)(0,1,1)[12] : Inf
ARIMA(1,0,3)(0,1,1)[12] with drift : Inf
ARIMA(1,0,3)(1,1,0)[12] : Inf
ARIMA(1,0,3)(1,1,0)[12] with drift : Inf
ARIMA(1,0,4)(0,1,0)[12] : Inf
ARIMA(1,0,4)(0,1,0)[12] with drift : Inf
Regression with ARIMA(2,0,0)(0,1,0)[12] errors : -1296.043
Regression with ARIMA(2,0,0)(0,1,0)[12] errors : -1290.419
ARIMA(2,0,0)(0,1,1)[12] : Inf
ARIMA(2,0,0)(0,1,1)[12] with drift : Inf
ARIMA(2,0,0)(0,1,2)[12] : Inf
ARIMA(2,0,0)(0,1,2)[12] with drift : Inf
Regression with ARIMA(2,0,0)(1,1,0)[12] errors : -1324.337
Regression with ARIMA(2,0,0)(1,1,0)[12] errors : -1318.711
ARIMA(2,0,0)(1,1,1)[12] : Inf
ARIMA(2,0,0)(1,1,1)[12] with drift : Inf
ARIMA(2,0,0)(1,1,2)[12] : Inf
ARIMA(2,0,0)(1,1,2)[12] with drift : Inf
Regression with ARIMA(2,0,0)(2,1,0)[12] errors : -1322.881
Regression with ARIMA(2,0,0)(2,1,0)[12] errors : -1317.273
ARIMA(2,0,0)(2,1,1)[12] : Inf
ARIMA(2,0,0)(2,1,1)[12] with drift : Inf
ARIMA(2,0,1)(0,1,0)[12] : Inf
ARIMA(2,0,1)(0,1,0)[12] with drift : Inf
ARIMA(2,0,1)(0,1,1)[12] : Inf
ARIMA(2,0,1)(0,1,1)[12] with drift : Inf
ARIMA(2,0,1)(0,1,2)[12] : Inf
ARIMA(2,0,1)(0,1,2)[12] with drift : Inf
ARIMA(2,0,1)(1,1,0)[12] : Inf
ARIMA(2,0,1)(1,1,0)[12] with drift : Inf
ARIMA(2,0,1)(1,1,1)[12] : Inf
ARIMA(2,0,1)(1,1,1)[12] with drift : Inf
ARIMA(2,0,1)(2,1,0)[12] : Inf
ARIMA(2,0,1)(2,1,0)[12] with drift : Inf
ARIMA(2,0,2)(0,1,0)[12] : Inf
ARIMA(2,0,2)(0,1,0)[12] with drift : Inf
ARIMA(2,0,2)(0,1,1)[12] : Inf
ARIMA(2,0,2)(0,1,1)[12] with drift : Inf
ARIMA(2,0,2)(1,1,0)[12] : Inf
ARIMA(2,0,2)(1,1,0)[12] with drift : Inf
ARIMA(2,0,3)(0,1,0)[12] : Inf
ARIMA(2,0,3)(0,1,0)[12] with drift : Inf
Regression with ARIMA(3,0,0)(0,1,0)[12] errors : -1299.895
Regression with ARIMA(3,0,0)(0,1,0)[12] errors : -1294.274
ARIMA(3,0,0)(0,1,1)[12] : Inf
ARIMA(3,0,0)(0,1,1)[12] with drift : Inf
ARIMA(3,0,0)(0,1,2)[12] : Inf
ARIMA(3,0,0)(0,1,2)[12] with drift : Inf
Regression with ARIMA(3,0,0)(1,1,0)[12] errors : -1331.524
Regression with ARIMA(3,0,0)(1,1,0)[12] errors : -1325.897
ARIMA(3,0,0)(1,1,1)[12] : Inf
ARIMA(3,0,0)(1,1,1)[12] with drift : Inf
Regression with ARIMA(3,0,0)(2,1,0)[12] errors : -1327.475
Regression with ARIMA(3,0,0)(2,1,0)[12] errors : -1321.866
ARIMA(3,0,1)(0,1,0)[12] : Inf
ARIMA(3,0,1)(0,1,0)[12] with drift : Inf
ARIMA(3,0,1)(0,1,1)[12] : Inf
ARIMA(3,0,1)(0,1,1)[12] with drift : Inf
ARIMA(3,0,1)(1,1,0)[12] : Inf
ARIMA(3,0,1)(1,1,0)[12] with drift : Inf
ARIMA(3,0,2)(0,1,0)[12] : Inf
ARIMA(3,0,2)(0,1,0)[12] with drift : Inf
Regression with ARIMA(4,0,0)(0,1,0)[12] errors : -1295.28
Regression with ARIMA(4,0,0)(0,1,0)[12] errors : -1289.679
ARIMA(4,0,0)(0,1,1)[12] : Inf
ARIMA(4,0,0)(0,1,1)[12] with drift : Inf
Regression with ARIMA(4,0,0)(1,1,0)[12] errors : -1328.722
Regression with ARIMA(4,0,0)(1,1,0)[12] errors : -1323.111
ARIMA(4,0,1)(0,1,0)[12] : Inf
ARIMA(4,0,1)(0,1,0)[12] with drift : Inf
Regression with ARIMA(5,0,0)(0,1,0)[12] errors : -1289.405
Regression with ARIMA(5,0,0)(0,1,0)[12] errors : -1283.807
Now re-fitting the best model(s) without approximations...
Best model: Regression with ARIMA(3,0,0)(1,1,0)[12] errors
Series: ts_ts(data$df_Retail_sales)
Regression with ARIMA(3,0,0)(1,1,0)[12] errors
Coefficients:
ar1 ar2 ar3 sar1 Series.1 Series.2 Series.3 Series.4 Series.5 Series.6 Series.7
-0.7780 -0.5118 -0.1977 -0.3457 -0.0005 -0.0073 -0.1060 -0.1102 0.2583 -0.0085 0.0062
s.e. 0.0592 0.0705 0.0605 0.0608 0.0116 0.0145 0.0151 0.0158 0.0153 0.0150 0.0148
Series.8 Series.9 Series.10 Series.11 Series.12 Series.13 Series.14 Series.15 Series.16 Series.17
-0.0231 -0.0078 0.0230 -0.0217 0.0224 -0.0628 -0.0652 0.1922 -0.0076 -0.0349
s.e. 0.0148 0.0148 0.0148 0.0148 0.0147 0.0146 0.0146 0.0146 0.0147 0.0146
Series.18 Series.19 Series.20 Series.21 Series.22 Series.23 Series.24 df_Retail_EU df_Retail_EU.1
-0.0316 -0.0121 0.0141 -0.0024 0.0305 -0.0074 -0.0135 0.4529 -0.0171
s.e. 0.0147 0.0148 0.0145 0.0146 0.0145 0.0145 0.0117 0.0816 0.0822
sigma^2 = 0.0002066: log likelihood = 796.26
AIC=-1530.53 AICc=-1522.43 BIC=-1418.18
forecast::auto.arima(ts_ts(data$df_Retail_sales),
ic="bic",
xreg = cbind(pandemicDummies["2000-02-01/2024-03-01"],
data$df_CHFEUR),
max.d = 0,
trace = TRUE,
stepwise = FALSE)
Fitting models using approximations to speed things up...
Regression with ARIMA(0,0,0)(0,1,0)[12] errors : -1162.762
Regression with ARIMA(0,0,0)(0,1,0)[12] errors : -1157.15
Regression with ARIMA(0,0,0)(0,1,1)[12] errors : -1197.04
Regression with ARIMA(0,0,0)(0,1,1)[12] errors : -1191.463
Regression with ARIMA(0,0,0)(0,1,2)[12] errors : -1192.36
Regression with ARIMA(0,0,0)(0,1,2)[12] errors : -1186.785
Regression with ARIMA(0,0,0)(1,1,0)[12] errors : -1192.004
Regression with ARIMA(0,0,0)(1,1,0)[12] errors : -1186.4
Regression with ARIMA(0,0,0)(1,1,1)[12] errors : -1191.637
Regression with ARIMA(0,0,0)(1,1,1)[12] errors : -1186.03
Regression with ARIMA(0,0,0)(1,1,2)[12] errors : -1189.16
Regression with ARIMA(0,0,0)(1,1,2)[12] errors : -1183.563
Regression with ARIMA(0,0,0)(2,1,0)[12] errors : -1193.032
Regression with ARIMA(0,0,0)(2,1,0)[12] errors : -1187.414
Regression with ARIMA(0,0,0)(2,1,1)[12] errors : -1197.744
Regression with ARIMA(0,0,0)(2,1,1)[12] errors : -1192.12
Regression with ARIMA(0,0,0)(2,1,2)[12] errors : -1192.207
Regression with ARIMA(0,0,0)(2,1,2)[12] errors : -1186.583
Regression with ARIMA(0,0,1)(0,1,0)[12] errors : -1289.347
Regression with ARIMA(0,0,1)(0,1,0)[12] errors : -1283.979
Regression with ARIMA(0,0,1)(0,1,1)[12] errors : -1316.578
Regression with ARIMA(0,0,1)(0,1,1)[12] errors : -1311.546
Regression with ARIMA(0,0,1)(0,1,2)[12] errors : -1311.275
Regression with ARIMA(0,0,1)(0,1,2)[12] errors : -1306.265
Regression with ARIMA(0,0,1)(1,1,0)[12] errors : -1313.43
Regression with ARIMA(0,0,1)(1,1,0)[12] errors : -1308.063
Regression with ARIMA(0,0,1)(1,1,1)[12] errors : -1314.561
Regression with ARIMA(0,0,1)(1,1,1)[12] errors : -1309.15
Regression with ARIMA(0,0,1)(1,1,2)[12] errors : -1309.202
Regression with ARIMA(0,0,1)(1,1,2)[12] errors : -1303.829
Regression with ARIMA(0,0,1)(2,1,0)[12] errors : -1316.254
Regression with ARIMA(0,0,1)(2,1,0)[12] errors : -1310.71
Regression with ARIMA(0,0,1)(2,1,1)[12] errors : -1321.092
Regression with ARIMA(0,0,1)(2,1,1)[12] errors : -1315.548
Regression with ARIMA(0,0,1)(2,1,2)[12] errors : -1315.468
Regression with ARIMA(0,0,1)(2,1,2)[12] errors : -1309.924
Regression with ARIMA(0,0,2)(0,1,0)[12] errors : -1288.527
Regression with ARIMA(0,0,2)(0,1,0)[12] errors : -1283.06
Regression with ARIMA(0,0,2)(0,1,1)[12] errors : -1314.056
Regression with ARIMA(0,0,2)(0,1,1)[12] errors : -1308.862
Regression with ARIMA(0,0,2)(0,1,2)[12] errors : -1308.545
Regression with ARIMA(0,0,2)(0,1,2)[12] errors : -1303.362
Regression with ARIMA(0,0,2)(1,1,0)[12] errors : -1312.276
Regression with ARIMA(0,0,2)(1,1,0)[12] errors : -1306.837
Regression with ARIMA(0,0,2)(1,1,1)[12] errors : -1312.872
Regression with ARIMA(0,0,2)(1,1,1)[12] errors : -1307.379
Regression with ARIMA(0,0,2)(1,1,2)[12] errors : -1307.304
Regression with ARIMA(0,0,2)(1,1,2)[12] errors : -1301.827
Regression with ARIMA(0,0,2)(2,1,0)[12] errors : -1314.121
Regression with ARIMA(0,0,2)(2,1,0)[12] errors : -1308.537
Regression with ARIMA(0,0,2)(2,1,1)[12] errors : -1317.786
Regression with ARIMA(0,0,2)(2,1,1)[12] errors : -1312.197
Regression with ARIMA(0,0,3)(0,1,0)[12] errors : -1284.675
Regression with ARIMA(0,0,3)(0,1,0)[12] errors : -1279.162
Regression with ARIMA(0,0,3)(0,1,1)[12] errors : -1309.761
Regression with ARIMA(0,0,3)(0,1,1)[12] errors : -1304.47
Regression with ARIMA(0,0,3)(0,1,2)[12] errors : -1304.202
Regression with ARIMA(0,0,3)(0,1,2)[12] errors : -1298.919
Regression with ARIMA(0,0,3)(1,1,0)[12] errors : -1308.569
Regression with ARIMA(0,0,3)(1,1,0)[12] errors : -1303.088
Regression with ARIMA(0,0,3)(1,1,1)[12] errors : -1308.71
Regression with ARIMA(0,0,3)(1,1,1)[12] errors : -1303.179
Regression with ARIMA(0,0,3)(2,1,0)[12] errors : -1309.713
Regression with ARIMA(0,0,3)(2,1,0)[12] errors : -1304.112
Regression with ARIMA(0,0,4)(0,1,0)[12] errors : -1281.287
Regression with ARIMA(0,0,4)(0,1,0)[12] errors : -1275.874
Regression with ARIMA(0,0,4)(0,1,1)[12] errors : -1305.289
Regression with ARIMA(0,0,4)(0,1,1)[12] errors : -1300.095
Regression with ARIMA(0,0,4)(1,1,0)[12] errors : -1304.365
Regression with ARIMA(0,0,4)(1,1,0)[12] errors : -1298.926
Regression with ARIMA(0,0,5)(0,1,0)[12] errors : -1277.867
Regression with ARIMA(0,0,5)(0,1,0)[12] errors : -1272.59
Regression with ARIMA(1,0,0)(0,1,0)[12] errors : -1241.425
Regression with ARIMA(1,0,0)(0,1,0)[12] errors : -1235.833
Regression with ARIMA(1,0,0)(0,1,1)[12] errors : -1270.95
Regression with ARIMA(1,0,0)(0,1,1)[12] errors : -1265.416
Regression with ARIMA(1,0,0)(0,1,2)[12] errors : -1265.608
Regression with ARIMA(1,0,0)(0,1,2)[12] errors : -1260.074
Regression with ARIMA(1,0,0)(1,1,0)[12] errors : -1269.137
Regression with ARIMA(1,0,0)(1,1,0)[12] errors : -1263.554
Regression with ARIMA(1,0,0)(1,1,1)[12] errors : -1268.177
Regression with ARIMA(1,0,0)(1,1,1)[12] errors : -1262.579
Regression with ARIMA(1,0,0)(1,1,2)[12] errors : -1263.996
Regression with ARIMA(1,0,0)(1,1,2)[12] errors : -1258.412
Regression with ARIMA(1,0,0)(2,1,0)[12] errors : -1271.767
Regression with ARIMA(1,0,0)(2,1,0)[12] errors : -1266.142
Regression with ARIMA(1,0,0)(2,1,1)[12] errors : -1274.61
Regression with ARIMA(1,0,0)(2,1,1)[12] errors : -1268.983
Regression with ARIMA(1,0,0)(2,1,2)[12] errors : -1268.994
Regression with ARIMA(1,0,0)(2,1,2)[12] errors : -1263.367
Regression with ARIMA(1,0,1)(0,1,0)[12] errors : -1287.001
Regression with ARIMA(1,0,1)(0,1,0)[12] errors : -1281.532
Regression with ARIMA(1,0,1)(0,1,1)[12] errors : -1313.889
Regression with ARIMA(1,0,1)(0,1,1)[12] errors : -1308.67
Regression with ARIMA(1,0,1)(0,1,2)[12] errors : -1308.397
Regression with ARIMA(1,0,1)(0,1,2)[12] errors : -1303.187
Regression with ARIMA(1,0,1)(1,1,0)[12] errors : -1312.22
Regression with ARIMA(1,0,1)(1,1,0)[12] errors : -1306.754
Regression with ARIMA(1,0,1)(1,1,1)[12] errors : -1312.01
Regression with ARIMA(1,0,1)(1,1,1)[12] errors : -1306.495
Regression with ARIMA(1,0,1)(1,1,2)[12] errors : -1306.67
Regression with ARIMA(1,0,1)(1,1,2)[12] errors : -1301.184
Regression with ARIMA(1,0,1)(2,1,0)[12] errors : -1317.247
Regression with ARIMA(1,0,1)(2,1,0)[12] errors : -1311.626
Regression with ARIMA(1,0,1)(2,1,1)[12] errors : -1315.974
Regression with ARIMA(1,0,1)(2,1,1)[12] errors : -1310.347
Regression with ARIMA(1,0,2)(0,1,0)[12] errors : -1283.986
Regression with ARIMA(1,0,2)(0,1,0)[12] errors : -1278.433
Regression with ARIMA(1,0,2)(0,1,1)[12] errors : -1310.241
Regression with ARIMA(1,0,2)(0,1,1)[12] errors : -1304.862
Regression with ARIMA(1,0,2)(0,1,2)[12] errors : -1304.656
Regression with ARIMA(1,0,2)(0,1,2)[12] errors : -1299.281
Regression with ARIMA(1,0,2)(1,1,0)[12] errors : -1309.533
Regression with ARIMA(1,0,2)(1,1,0)[12] errors : -1303.98
Regression with ARIMA(1,0,2)(1,1,1)[12] errors : -1308.081
Regression with ARIMA(1,0,2)(1,1,1)[12] errors : -1302.515
Regression with ARIMA(1,0,2)(2,1,0)[12] errors : -1312.29
Regression with ARIMA(1,0,2)(2,1,0)[12] errors : -1306.663
Regression with ARIMA(1,0,3)(0,1,0)[12] errors : -1279.494
Regression with ARIMA(1,0,3)(0,1,0)[12] errors : -1273.957
Regression with ARIMA(1,0,3)(0,1,1)[12] errors : -1304.852
Regression with ARIMA(1,0,3)(0,1,1)[12] errors : -1299.514
Regression with ARIMA(1,0,3)(1,1,0)[12] errors : -1303.89
Regression with ARIMA(1,0,3)(1,1,0)[12] errors : -1298.369
Regression with ARIMA(1,0,4)(0,1,0)[12] errors : -1284.018
Regression with ARIMA(1,0,4)(0,1,0)[12] errors : -1278.526
Regression with ARIMA(2,0,0)(0,1,0)[12] errors : -1280.121
Regression with ARIMA(2,0,0)(0,1,0)[12] errors : -1274.576
Regression with ARIMA(2,0,0)(0,1,1)[12] errors : -1304.501
Regression with ARIMA(2,0,0)(0,1,1)[12] errors : -1299.065
Regression with ARIMA(2,0,0)(0,1,2)[12] errors : -1299.015
Regression with ARIMA(2,0,0)(0,1,2)[12] errors : -1293.581
Regression with ARIMA(2,0,0)(1,1,0)[12] errors : -1303.007
Regression with ARIMA(2,0,0)(1,1,0)[12] errors : -1297.482
Regression with ARIMA(2,0,0)(1,1,1)[12] errors : -1305.535
Regression with ARIMA(2,0,0)(1,1,1)[12] errors : -1299.963
Regression with ARIMA(2,0,0)(1,1,2)[12] errors : -1299.907
Regression with ARIMA(2,0,0)(1,1,2)[12] errors : -1294.336
Regression with ARIMA(2,0,0)(2,1,0)[12] errors : -1307.549
Regression with ARIMA(2,0,0)(2,1,0)[12] errors : -1301.923
Regression with ARIMA(2,0,0)(2,1,1)[12] errors : -1307.493
Regression with ARIMA(2,0,0)(2,1,1)[12] errors : -1301.869
Regression with ARIMA(2,0,1)(0,1,0)[12] errors : -1284.532
Regression with ARIMA(2,0,1)(0,1,0)[12] errors : -1279.016
Regression with ARIMA(2,0,1)(0,1,1)[12] errors : -1309.01
Regression with ARIMA(2,0,1)(0,1,1)[12] errors : -1303.692
Regression with ARIMA(2,0,1)(0,1,2)[12] errors : -1303.449
Regression with ARIMA(2,0,1)(0,1,2)[12] errors : -1298.137
Regression with ARIMA(2,0,1)(1,1,0)[12] errors : -1307.416
Regression with ARIMA(2,0,1)(1,1,0)[12] errors : -1301.921
Regression with ARIMA(2,0,1)(1,1,1)[12] errors : -1308.7
Regression with ARIMA(2,0,1)(1,1,1)[12] errors : -1303.168
Regression with ARIMA(2,0,1)(2,1,0)[12] errors : -1313.863
Regression with ARIMA(2,0,1)(2,1,0)[12] errors : -1308.238
Regression with ARIMA(2,0,2)(0,1,0)[12] errors : -1278.998
Regression with ARIMA(2,0,2)(0,1,0)[12] errors : -1273.473
Regression with ARIMA(2,0,2)(0,1,1)[12] errors : -1303.478
Regression with ARIMA(2,0,2)(0,1,1)[12] errors : -1298.185
Regression with ARIMA(2,0,2)(1,1,0)[12] errors : -1301.869
Regression with ARIMA(2,0,2)(1,1,0)[12] errors : -1296.368
Regression with ARIMA(2,0,3)(0,1,0)[12] errors : -1280.152
Regression with ARIMA(2,0,3)(0,1,0)[12] errors : -1274.715
Regression with ARIMA(3,0,0)(0,1,0)[12] errors : -1290.39
Regression with ARIMA(3,0,0)(0,1,0)[12] errors : -1284.809
Regression with ARIMA(3,0,0)(0,1,1)[12] errors : -1315.9
Regression with ARIMA(3,0,0)(0,1,1)[12] errors : -1310.397
Regression with ARIMA(3,0,0)(0,1,2)[12] errors : -1310.313
Regression with ARIMA(3,0,0)(0,1,2)[12] errors : -1304.809
Regression with ARIMA(3,0,0)(1,1,0)[12] errors : -1313.122
Regression with ARIMA(3,0,0)(1,1,0)[12] errors : -1307.576
Regression with ARIMA(3,0,0)(1,1,1)[12] errors : -1309.36
Regression with ARIMA(3,0,0)(1,1,1)[12] errors : -1303.794
Regression with ARIMA(3,0,0)(2,1,0)[12] errors : -1315.058
Regression with ARIMA(3,0,0)(2,1,0)[12] errors : -1309.434
Regression with ARIMA(3,0,1)(0,1,0)[12] errors : -1284.919
Regression with ARIMA(3,0,1)(0,1,0)[12] errors : -1279.335
Regression with ARIMA(3,0,1)(0,1,1)[12] errors : -1312.16
Regression with ARIMA(3,0,1)(0,1,1)[12] errors : -1306.642
Regression with ARIMA(3,0,1)(1,1,0)[12] errors : -1311.831
Regression with ARIMA(3,0,1)(1,1,0)[12] errors : -1306.207
Regression with ARIMA(3,0,2)(0,1,0)[12] errors : -1279.642
Regression with ARIMA(3,0,2)(0,1,0)[12] errors : -1274.05
Regression with ARIMA(4,0,0)(0,1,0)[12] errors : -1284.514
Regression with ARIMA(4,0,0)(0,1,0)[12] errors : -1278.913
Regression with ARIMA(4,0,0)(0,1,1)[12] errors : -1311.439
Regression with ARIMA(4,0,0)(0,1,1)[12] errors : -1305.9
Regression with ARIMA(4,0,0)(1,1,0)[12] errors : -1309.7
Regression with ARIMA(4,0,0)(1,1,0)[12] errors : -1304.106
Regression with ARIMA(4,0,1)(0,1,0)[12] errors : -1280.058
Regression with ARIMA(4,0,1)(0,1,0)[12] errors : -1274.458
Regression with ARIMA(5,0,0)(0,1,0)[12] errors : -1280.202
Regression with ARIMA(5,0,0)(0,1,0)[12] errors : -1274.642
Now re-fitting the best model(s) without approximations...
Best model: Regression with ARIMA(0,0,1)(2,1,1)[12] errors
Series: ts_ts(data$df_Retail_sales)
Regression with ARIMA(0,0,1)(2,1,1)[12] errors
Coefficients:
ma1 sar1 sar2 sma1 Series.1 Series.2 Series.3 Series.4 Series.5 Series.6 Series.7 Series.8
-0.7105 0.1798 0.0480 -0.5621 0.0012 0.0041 -0.0808 -0.1313 0.2679 -0.0256 0.0062 -0.0121
s.e. 0.0419 0.2238 0.1106 0.2132 0.0128 0.0155 0.0155 0.0156 0.0156 0.0156 0.0156 0.0156
Series.9 Series.10 Series.11 Series.12 Series.13 Series.14 Series.15 Series.16 Series.17 Series.18
-0.0173 0.0387 -0.0298 0.0348 -0.0664 -0.0624 0.1969 -0.0105 -0.0366 -0.0375
s.e. 0.0156 0.0155 0.0155 0.0153 0.0153 0.0155 0.0155 0.0156 0.0156 0.0157
Series.19 Series.20 Series.21 Series.22 Series.23 Series.24 df_CHFEUR
-0.0179 0.0143 -0.0022 0.0375 -0.0028 -0.0078 0.0623
s.e. 0.0157 0.0155 0.0155 0.0156 0.0156 0.0128 0.0361
sigma^2 = 0.0002281: log likelihood = 785.07
AIC=-1510.15 AICc=-1502.62 BIC=-1401.32
forecast::auto.arima(ts_ts(data$df_Retail_sales),
ic="bic",
xreg = cbind(pandemicDummies["2000-02-01/2024-03-01"],
data$df_Retail_EU,
data$df_CHFEUR),
max.d = 0,
trace = TRUE,
stepwise = FALSE)
Fitting models using approximations to speed things up...
Regression with ARIMA(0,0,0)(0,1,0)[12] errors : -1184.17
Regression with ARIMA(0,0,0)(0,1,0)[12] errors : -1178.551
Regression with ARIMA(0,0,0)(0,1,1)[12] errors : -1219.398
Regression with ARIMA(0,0,0)(0,1,1)[12] errors : -1213.785
Regression with ARIMA(0,0,0)(0,1,2)[12] errors : -1213.928
Regression with ARIMA(0,0,0)(0,1,2)[12] errors : -1208.315
Regression with ARIMA(0,0,0)(1,1,0)[12] errors : -1223.131
Regression with ARIMA(0,0,0)(1,1,0)[12] errors : -1217.521
Regression with ARIMA(0,0,0)(1,1,1)[12] errors : -1222.547
Regression with ARIMA(0,0,0)(1,1,1)[12] errors : -1216.931
Regression with ARIMA(0,0,0)(1,1,2)[12] errors : -1218.036
Regression with ARIMA(0,0,0)(1,1,2)[12] errors : -1212.422
Regression with ARIMA(0,0,0)(2,1,0)[12] errors : -1222.187
Regression with ARIMA(0,0,0)(2,1,0)[12] errors : -1216.559
Regression with ARIMA(0,0,0)(2,1,1)[12] errors : -1220.962
Regression with ARIMA(0,0,0)(2,1,1)[12] errors : -1215.34
Regression with ARIMA(0,0,0)(2,1,2)[12] errors : -1215.45
Regression with ARIMA(0,0,0)(2,1,2)[12] errors : -1209.828
Regression with ARIMA(0,0,1)(0,1,0)[12] errors : -1309.572
Regression with ARIMA(0,0,1)(0,1,0)[12] errors : -1304.043
Regression with ARIMA(0,0,1)(0,1,1)[12] errors : -1338.992
Regression with ARIMA(0,0,1)(0,1,1)[12] errors : -1333.469
Regression with ARIMA(0,0,1)(0,1,2)[12] errors : -1333.382
Regression with ARIMA(0,0,1)(0,1,2)[12] errors : -1327.861
Regression with ARIMA(0,0,1)(1,1,0)[12] errors : -1335.185
Regression with ARIMA(0,0,1)(1,1,0)[12] errors : -1329.641
Regression with ARIMA(0,0,1)(1,1,1)[12] errors : -1335.191
Regression with ARIMA(0,0,1)(1,1,1)[12] errors : -1329.616
Regression with ARIMA(0,0,1)(1,1,2)[12] errors : -1329.661
Regression with ARIMA(0,0,1)(1,1,2)[12] errors : -1324.092
Regression with ARIMA(0,0,1)(2,1,0)[12] errors : -1341.928
Regression with ARIMA(0,0,1)(2,1,0)[12] errors : -1336.311
Regression with ARIMA(0,0,1)(2,1,1)[12] errors : -1341.917
Regression with ARIMA(0,0,1)(2,1,1)[12] errors : -1336.334
Regression with ARIMA(0,0,1)(2,1,2)[12] errors : -1336.304
Regression with ARIMA(0,0,1)(2,1,2)[12] errors : -1330.719
Regression with ARIMA(0,0,2)(0,1,0)[12] errors : -1308.34
Regression with ARIMA(0,0,2)(0,1,0)[12] errors : -1302.775
Regression with ARIMA(0,0,2)(0,1,1)[12] errors : -1337.087
Regression with ARIMA(0,0,2)(0,1,1)[12] errors : -1331.532
Regression with ARIMA(0,0,2)(0,1,2)[12] errors : -1331.475
Regression with ARIMA(0,0,2)(0,1,2)[12] errors : -1325.919
Regression with ARIMA(0,0,2)(1,1,0)[12] errors : -1334.662
Regression with ARIMA(0,0,2)(1,1,0)[12] errors : -1329.106
Regression with ARIMA(0,0,2)(1,1,1)[12] errors : -1334.632
Regression with ARIMA(0,0,2)(1,1,1)[12] errors : -1329.04
Regression with ARIMA(0,0,2)(1,1,2)[12] errors : -1329.015
Regression with ARIMA(0,0,2)(1,1,2)[12] errors : -1323.421
Regression with ARIMA(0,0,2)(2,1,0)[12] errors : -1340.05
Regression with ARIMA(0,0,2)(2,1,0)[12] errors : -1334.436
Regression with ARIMA(0,0,2)(2,1,1)[12] errors : -1339.602
Regression with ARIMA(0,0,2)(2,1,1)[12] errors : -1334.025
Regression with ARIMA(0,0,3)(0,1,0)[12] errors : -1303.851
Regression with ARIMA(0,0,3)(0,1,0)[12] errors : -1298.27
Regression with ARIMA(0,0,3)(0,1,1)[12] errors : -1332.447
Regression with ARIMA(0,0,3)(0,1,1)[12] errors : -1326.878
Regression with ARIMA(0,0,3)(0,1,2)[12] errors : -1326.832
Regression with ARIMA(0,0,3)(0,1,2)[12] errors : -1321.263
Regression with ARIMA(0,0,3)(1,1,0)[12] errors : -1331.087
Regression with ARIMA(0,0,3)(1,1,0)[12] errors : -1325.525
Regression with ARIMA(0,0,3)(1,1,1)[12] errors : -1331.343
Regression with ARIMA(0,0,3)(1,1,1)[12] errors : -1325.742
Regression with ARIMA(0,0,3)(2,1,0)[12] errors : -1335.672
Regression with ARIMA(0,0,3)(2,1,0)[12] errors : -1330.059
Regression with ARIMA(0,0,4)(0,1,0)[12] errors : -1300.89
Regression with ARIMA(0,0,4)(0,1,0)[12] errors : -1295.352
Regression with ARIMA(0,0,4)(0,1,1)[12] errors : -1327.472
Regression with ARIMA(0,0,4)(0,1,1)[12] errors : -1321.919
Regression with ARIMA(0,0,4)(1,1,0)[12] errors : -1326.096
Regression with ARIMA(0,0,4)(1,1,0)[12] errors : -1320.538
Regression with ARIMA(0,0,5)(0,1,0)[12] errors : -1297.439
Regression with ARIMA(0,0,5)(0,1,0)[12] errors : -1291.938
Regression with ARIMA(1,0,0)(0,1,0)[12] errors : -1263.443
Regression with ARIMA(1,0,0)(0,1,0)[12] errors : -1257.832
Regression with ARIMA(1,0,0)(0,1,1)[12] errors : -1296.697
Regression with ARIMA(1,0,0)(0,1,1)[12] errors : -1291.082
Regression with ARIMA(1,0,0)(0,1,2)[12] errors : -1291.254
Regression with ARIMA(1,0,0)(0,1,2)[12] errors : -1285.639
Regression with ARIMA(1,0,0)(1,1,0)[12] errors : -1299.973
Regression with ARIMA(1,0,0)(1,1,0)[12] errors : -1294.358
Regression with ARIMA(1,0,0)(1,1,1)[12] errors : -1298.288
Regression with ARIMA(1,0,0)(1,1,1)[12] errors : -1292.663
Regression with ARIMA(1,0,0)(1,1,2)[12] errors : -1292.725
Regression with ARIMA(1,0,0)(1,1,2)[12] errors : -1287.101
Regression with ARIMA(1,0,0)(2,1,0)[12] errors : -1299.974
Regression with ARIMA(1,0,0)(2,1,0)[12] errors : -1294.362
Regression with ARIMA(1,0,0)(2,1,1)[12] errors : -1296.169
Regression with ARIMA(1,0,0)(2,1,1)[12] errors : -1290.576
Regression with ARIMA(1,0,0)(2,1,2)[12] errors : -1290.544
Regression with ARIMA(1,0,0)(2,1,2)[12] errors : -1284.95
Regression with ARIMA(1,0,1)(0,1,0)[12] errors : -1306.687
Regression with ARIMA(1,0,1)(0,1,0)[12] errors : -1301.116
Regression with ARIMA(1,0,1)(0,1,1)[12] errors : -1336.199
Regression with ARIMA(1,0,1)(0,1,1)[12] errors : -1330.625
Regression with ARIMA(1,0,1)(0,1,2)[12] errors : -1330.582
Regression with ARIMA(1,0,1)(0,1,2)[12] errors : -1325.009
Regression with ARIMA(1,0,1)(1,1,0)[12] errors : -1337.609
Regression with ARIMA(1,0,1)(1,1,0)[12] errors : -1331.999
Regression with ARIMA(1,0,1)(1,1,1)[12] errors : -1336.315
Regression with ARIMA(1,0,1)(1,1,1)[12] errors : -1330.688
Regression with ARIMA(1,0,1)(1,1,2)[12] errors : -1330.743
Regression with ARIMA(1,0,1)(1,1,2)[12] errors : -1325.117
Regression with ARIMA(1,0,1)(2,1,0)[12] errors : -1342.084
Regression with ARIMA(1,0,1)(2,1,0)[12] errors : -1336.539
Regression with ARIMA(1,0,1)(2,1,1)[12] errors : -1337.534
Regression with ARIMA(1,0,1)(2,1,1)[12] errors : -1332.026
Regression with ARIMA(1,0,2)(0,1,0)[12] errors : -1302.909
Regression with ARIMA(1,0,2)(0,1,0)[12] errors : -1297.309
Regression with ARIMA(1,0,2)(0,1,1)[12] errors : -1332.308
Regression with ARIMA(1,0,2)(0,1,1)[12] errors : -1326.705
Regression with ARIMA(1,0,2)(0,1,2)[12] errors : -1326.722
Regression with ARIMA(1,0,2)(0,1,2)[12] errors : -1321.119
Regression with ARIMA(1,0,2)(1,1,0)[12] errors : -1337.721
Regression with ARIMA(1,0,2)(1,1,0)[12] errors : -1332.162
Regression with ARIMA(1,0,2)(1,1,1)[12] errors : -1334.33
Regression with ARIMA(1,0,2)(1,1,1)[12] errors : -1328.801
Regression with ARIMA(1,0,2)(2,1,0)[12] errors : -1336.787
Regression with ARIMA(1,0,2)(2,1,0)[12] errors : -1331.25
Regression with ARIMA(1,0,3)(0,1,0)[12] errors : -1298.3
Regression with ARIMA(1,0,3)(0,1,0)[12] errors : -1292.707
Regression with ARIMA(1,0,3)(0,1,1)[12] errors : -1326.882
Regression with ARIMA(1,0,3)(0,1,1)[12] errors : -1321.293
Regression with ARIMA(1,0,3)(1,1,0)[12] errors : -1335.354
Regression with ARIMA(1,0,3)(1,1,0)[12] errors : -1329.846
Regression with ARIMA(1,0,4)(0,1,0)[12] errors : -1299.852
Regression with ARIMA(1,0,4)(0,1,0)[12] errors : -1294.224
Regression with ARIMA(2,0,0)(0,1,0)[12] errors : -1300.357
Regression with ARIMA(2,0,0)(0,1,0)[12] errors : -1294.765
Regression with ARIMA(2,0,0)(0,1,1)[12] errors : -1327.467
Regression with ARIMA(2,0,0)(0,1,1)[12] errors : -1321.878
Regression with ARIMA(2,0,0)(0,1,2)[12] errors : -1321.847
Regression with ARIMA(2,0,0)(0,1,2)[12] errors : -1316.258
Regression with ARIMA(2,0,0)(1,1,0)[12] errors : -1329.21
Regression with ARIMA(2,0,0)(1,1,0)[12] errors : -1323.614
Regression with ARIMA(2,0,0)(1,1,1)[12] errors : -1330.379
Regression with ARIMA(2,0,0)(1,1,1)[12] errors : -1324.756
Regression with ARIMA(2,0,0)(1,1,2)[12] errors : -1324.788
Regression with ARIMA(2,0,0)(1,1,2)[12] errors : -1319.164
Regression with ARIMA(2,0,0)(2,1,0)[12] errors : -1334.035
Regression with ARIMA(2,0,0)(2,1,0)[12] errors : -1328.452
Regression with ARIMA(2,0,0)(2,1,1)[12] errors : -1329.957
Regression with ARIMA(2,0,0)(2,1,1)[12] errors : -1324.407
Regression with ARIMA(2,0,1)(0,1,0)[12] errors : -1303.465
Regression with ARIMA(2,0,1)(0,1,0)[12] errors : -1297.88
Regression with ARIMA(2,0,1)(0,1,1)[12] errors : -1330.708
Regression with ARIMA(2,0,1)(0,1,1)[12] errors : -1325.137
Regression with ARIMA(2,0,1)(0,1,2)[12] errors : -1325.085
Regression with ARIMA(2,0,1)(0,1,2)[12] errors : -1319.514
Regression with ARIMA(2,0,1)(1,1,0)[12] errors : -1331.47
Regression with ARIMA(2,0,1)(1,1,0)[12] errors : -1325.87
Regression with ARIMA(2,0,1)(1,1,1)[12] errors : -1332.083
Regression with ARIMA(2,0,1)(1,1,1)[12] errors : -1326.462
Regression with ARIMA(2,0,1)(2,1,0)[12] errors : -1338.986
Regression with ARIMA(2,0,1)(2,1,0)[12] errors : -1333.418
Regression with ARIMA(2,0,2)(0,1,0)[12] errors : -1297.84
Regression with ARIMA(2,0,2)(0,1,0)[12] errors : -1292.255
Regression with ARIMA(2,0,2)(0,1,1)[12] errors : -1325.299
Regression with ARIMA(2,0,2)(0,1,1)[12] errors : -1319.733
Regression with ARIMA(2,0,2)(1,1,0)[12] errors : -1325.877
Regression with ARIMA(2,0,2)(1,1,0)[12] errors : -1320.277
Regression with ARIMA(2,0,3)(0,1,0)[12] errors : -1303.223
Regression with ARIMA(2,0,3)(0,1,0)[12] errors : -1297.675
Regression with ARIMA(3,0,0)(0,1,0)[12] errors : -1308.966
Regression with ARIMA(3,0,0)(0,1,0)[12] errors : -1303.349
Regression with ARIMA(3,0,0)(0,1,1)[12] errors : -1337.827
Regression with ARIMA(3,0,0)(0,1,1)[12] errors : -1332.205
Regression with ARIMA(3,0,0)(0,1,2)[12] errors : -1332.551
Regression with ARIMA(3,0,0)(0,1,2)[12] errors : -1326.93
Regression with ARIMA(3,0,0)(1,1,0)[12] errors : -1338.525
Regression with ARIMA(3,0,0)(1,1,0)[12] errors : -1332.904
Regression with ARIMA(3,0,0)(1,1,1)[12] errors : -1334.112
Regression with ARIMA(3,0,0)(1,1,1)[12] errors : -1328.486
Regression with ARIMA(3,0,0)(2,1,0)[12] errors : -1340.138
Regression with ARIMA(3,0,0)(2,1,0)[12] errors : -1334.547
Regression with ARIMA(3,0,1)(0,1,0)[12] errors : -1303.344
Regression with ARIMA(3,0,1)(0,1,0)[12] errors : -1297.727
Regression with ARIMA(3,0,1)(0,1,1)[12] errors : -1333.488
Regression with ARIMA(3,0,1)(0,1,1)[12] errors : -1327.861
Regression with ARIMA(3,0,1)(1,1,0)[12] errors : -1337.837
Regression with ARIMA(3,0,1)(1,1,0)[12] errors : -1332.293
Regression with ARIMA(3,0,2)(0,1,0)[12] errors : -1297.918
Regression with ARIMA(3,0,2)(0,1,0)[12] errors : -1292.299
Regression with ARIMA(4,0,0)(0,1,0)[12] errors : -1302.823
Regression with ARIMA(4,0,0)(0,1,0)[12] errors : -1297.2
Regression with ARIMA(4,0,0)(0,1,1)[12] errors : -1332.501
Regression with ARIMA(4,0,0)(0,1,1)[12] errors : -1326.873
Regression with ARIMA(4,0,0)(1,1,0)[12] errors : -1335.882
Regression with ARIMA(4,0,0)(1,1,0)[12] errors : -1330.256
Regression with ARIMA(4,0,1)(0,1,0)[12] errors : -1297.869
Regression with ARIMA(4,0,1)(0,1,0)[12] errors : -1292.244
Regression with ARIMA(5,0,0)(0,1,0)[12] errors : -1298.567
Regression with ARIMA(5,0,0)(0,1,0)[12] errors : -1292.964
Now re-fitting the best model(s) without approximations...
Best model: Regression with ARIMA(1,0,1)(2,1,0)[12] errors
Series: ts_ts(data$df_Retail_sales)
Regression with ARIMA(1,0,1)(2,1,0)[12] errors
Coefficients:
ar1 ma1 sar1 sar2 Series.1 Series.2 Series.3 Series.4 Series.5 Series.6 Series.7
-0.1511 -0.6163 -0.3848 -0.0919 0.0014 -0.0083 -0.1059 -0.1052 0.2547 -0.0105 0.0084
s.e. 0.0834 0.0663 0.0647 0.0684 0.0118 0.0148 0.0154 0.0158 0.0152 0.0150 0.0149
Series.8 Series.9 Series.10 Series.11 Series.12 Series.13 Series.14 Series.15 Series.16 Series.17
-0.025 -0.0092 0.0248 -0.0227 0.0215 -0.0634 -0.0650 0.1907 -0.0079 -0.0337
s.e. 0.015 0.0148 0.0150 0.0148 0.0148 0.0146 0.0147 0.0148 0.0148 0.0148
Series.18 Series.19 Series.20 Series.21 Series.22 Series.23 Series.24 df_Retail_EU df_CHFEUR
-0.0314 -0.0123 0.0133 -0.0024 0.0298 -0.0050 -0.0108 0.4602 0.0692
s.e. 0.0149 0.0149 0.0148 0.0148 0.0148 0.0147 0.0119 0.0825 0.0340
sigma^2 = 0.0002062: log likelihood = 799.85
AIC=-1537.7 AICc=-1529.63 BIC=-1425.24
Model the multivariate model with Auto Arima to account for the seosonality.
AR/MA terms for the evaluation (see chapter Evaluation):
Retail_EU_cycle: ARIMA(2,0,3) ARIMA(0,0,1)(0,1,1)[12] CHFEUR: ARIMA(0,0,1) Retail_EU_cycle AND CHFEUR: ARIMA(0,0,1) ARIMA(1,0,1)(2,1,0)[12]
modelretailsales <- forecast::auto.arima(ts_ts(data$df_Retail_sales),
ic="bic",
xreg = cbind(pandemicDummies["2000-02-01/2024-03-01"],
data$df_Retail_EU
),
max.d = 0,
trace = TRUE,
stepwise = FALSE)
Fitting models using approximations to speed things up...
Regression with ARIMA(0,0,0)(0,1,0)[12] errors : -1186.405
Regression with ARIMA(0,0,0)(0,1,0)[12] errors : -1180.785
Regression with ARIMA(0,0,0)(0,1,1)[12] errors : -1221.354
Regression with ARIMA(0,0,0)(0,1,1)[12] errors : -1215.739
Regression with ARIMA(0,0,0)(0,1,2)[12] errors : -1216.148
Regression with ARIMA(0,0,0)(0,1,2)[12] errors : -1210.534
Regression with ARIMA(0,0,0)(1,1,0)[12] errors : -1222.289
Regression with ARIMA(0,0,0)(1,1,0)[12] errors : -1216.676
Regression with ARIMA(0,0,0)(1,1,1)[12] errors : -1221.957
Regression with ARIMA(0,0,0)(1,1,1)[12] errors : -1216.341
Regression with ARIMA(0,0,0)(1,1,2)[12] errors : -1217.901
Regression with ARIMA(0,0,0)(1,1,2)[12] errors : -1212.287
Regression with ARIMA(0,0,0)(2,1,0)[12] errors : -1219.63
Regression with ARIMA(0,0,0)(2,1,0)[12] errors : -1214.003
Regression with ARIMA(0,0,0)(2,1,1)[12] errors : -1219.999
Regression with ARIMA(0,0,0)(2,1,1)[12] errors : -1214.373
Regression with ARIMA(0,0,0)(2,1,2)[12] errors : -1214.476
Regression with ARIMA(0,0,0)(2,1,2)[12] errors : -1208.85
Regression with ARIMA(0,0,1)(0,1,0)[12] errors : -1312.424
Regression with ARIMA(0,0,1)(0,1,0)[12] errors : -1306.889
Regression with ARIMA(0,0,1)(0,1,1)[12] errors : -1341.664
Regression with ARIMA(0,0,1)(0,1,1)[12] errors : -1336.138
Regression with ARIMA(0,0,1)(0,1,2)[12] errors : -1336.24
Regression with ARIMA(0,0,1)(0,1,2)[12] errors : -1330.72
Regression with ARIMA(0,0,1)(1,1,0)[12] errors : -1336.113
Regression with ARIMA(0,0,1)(1,1,0)[12] errors : -1330.565
Regression with ARIMA(0,0,1)(1,1,1)[12] errors : -1336.828
Regression with ARIMA(0,0,1)(1,1,1)[12] errors : -1331.267
Regression with ARIMA(0,0,1)(1,1,2)[12] errors : -1331.487
Regression with ARIMA(0,0,1)(1,1,2)[12] errors : -1325.935
Regression with ARIMA(0,0,1)(2,1,0)[12] errors : -1341.735
Regression with ARIMA(0,0,1)(2,1,0)[12] errors : -1336.11
Regression with ARIMA(0,0,1)(2,1,1)[12] errors : -1341.534
Regression with ARIMA(0,0,1)(2,1,1)[12] errors : -1335.916
Regression with ARIMA(0,0,1)(2,1,2)[12] errors : -1336.256
Regression with ARIMA(0,0,1)(2,1,2)[12] errors : -1330.635
Regression with ARIMA(0,0,2)(0,1,0)[12] errors : -1311.167
Regression with ARIMA(0,0,2)(0,1,0)[12] errors : -1305.599
Regression with ARIMA(0,0,2)(0,1,1)[12] errors : -1339.729
Regression with ARIMA(0,0,2)(0,1,1)[12] errors : -1334.172
Regression with ARIMA(0,0,2)(0,1,2)[12] errors : -1334.136
Regression with ARIMA(0,0,2)(0,1,2)[12] errors : -1328.58
Regression with ARIMA(0,0,2)(1,1,0)[12] errors : -1335.577
Regression with ARIMA(0,0,2)(1,1,0)[12] errors : -1330.019
Regression with ARIMA(0,0,2)(1,1,1)[12] errors : -1336.006
Regression with ARIMA(0,0,2)(1,1,1)[12] errors : -1330.423
Regression with ARIMA(0,0,2)(1,1,2)[12] errors : -1330.405
Regression with ARIMA(0,0,2)(1,1,2)[12] errors : -1324.826
Regression with ARIMA(0,0,2)(2,1,0)[12] errors : -1339.765
Regression with ARIMA(0,0,2)(2,1,0)[12] errors : -1334.142
Regression with ARIMA(0,0,2)(2,1,1)[12] errors : -1339.078
Regression with ARIMA(0,0,2)(2,1,1)[12] errors : -1333.467
Regression with ARIMA(0,0,3)(0,1,0)[12] errors : -1306.639
Regression with ARIMA(0,0,3)(0,1,0)[12] errors : -1301.058
Regression with ARIMA(0,0,3)(0,1,1)[12] errors : -1335.128
Regression with ARIMA(0,0,3)(0,1,1)[12] errors : -1329.558
Regression with ARIMA(0,0,3)(0,1,2)[12] errors : -1329.536
Regression with ARIMA(0,0,3)(0,1,2)[12] errors : -1323.967
Regression with ARIMA(0,0,3)(1,1,0)[12] errors : -1331.933
Regression with ARIMA(0,0,3)(1,1,0)[12] errors : -1326.369
Regression with ARIMA(0,0,3)(1,1,1)[12] errors : -1332.58
Regression with ARIMA(0,0,3)(1,1,1)[12] errors : -1326.987
Regression with ARIMA(0,0,3)(2,1,0)[12] errors : -1335.317
Regression with ARIMA(0,0,3)(2,1,0)[12] errors : -1329.696
Regression with ARIMA(0,0,4)(0,1,0)[12] errors : -1303.797
Regression with ARIMA(0,0,4)(0,1,0)[12] errors : -1298.253
Regression with ARIMA(0,0,4)(0,1,1)[12] errors : -1330.239
Regression with ARIMA(0,0,4)(0,1,1)[12] errors : -1324.684
Regression with ARIMA(0,0,4)(1,1,0)[12] errors : -1327.128
Regression with ARIMA(0,0,4)(1,1,0)[12] errors : -1321.568
Regression with ARIMA(0,0,5)(0,1,0)[12] errors : -1299.658
Regression with ARIMA(0,0,5)(0,1,0)[12] errors : -1294.144
Regression with ARIMA(1,0,0)(0,1,0)[12] errors : -1265.476
Regression with ARIMA(1,0,0)(0,1,0)[12] errors : -1259.862
Regression with ARIMA(1,0,0)(0,1,1)[12] errors : -1298.491
Regression with ARIMA(1,0,0)(0,1,1)[12] errors : -1292.875
Regression with ARIMA(1,0,0)(0,1,2)[12] errors : -1292.886
Regression with ARIMA(1,0,0)(0,1,2)[12] errors : -1287.27
Regression with ARIMA(1,0,0)(1,1,0)[12] errors : -1299.829
Regression with ARIMA(1,0,0)(1,1,0)[12] errors : -1294.212
Regression with ARIMA(1,0,0)(1,1,1)[12] errors : -1298.197
Regression with ARIMA(1,0,0)(1,1,1)[12] errors : -1292.573
Regression with ARIMA(1,0,0)(1,1,2)[12] errors : -1292.848
Regression with ARIMA(1,0,0)(1,1,2)[12] errors : -1287.225
Regression with ARIMA(1,0,0)(2,1,0)[12] errors : -1298.173
Regression with ARIMA(1,0,0)(2,1,0)[12] errors : -1292.556
Regression with ARIMA(1,0,0)(2,1,1)[12] errors : -1294.727
Regression with ARIMA(1,0,0)(2,1,1)[12] errors : -1289.117
Regression with ARIMA(1,0,0)(2,1,2)[12] errors : -1289.169
Regression with ARIMA(1,0,0)(2,1,2)[12] errors : -1283.559
Regression with ARIMA(1,0,1)(0,1,0)[12] errors : -1309.445
Regression with ARIMA(1,0,1)(0,1,0)[12] errors : -1303.873
Regression with ARIMA(1,0,1)(0,1,1)[12] errors : -1338.685
Regression with ARIMA(1,0,1)(0,1,1)[12] errors : -1333.111
Regression with ARIMA(1,0,1)(0,1,2)[12] errors : -1333.106
Regression with ARIMA(1,0,1)(0,1,2)[12] errors : -1327.534
Regression with ARIMA(1,0,1)(1,1,0)[12] errors : -1338.349
Regression with ARIMA(1,0,1)(1,1,0)[12] errors : -1332.737
Regression with ARIMA(1,0,1)(1,1,1)[12] errors : -1337.459
Regression with ARIMA(1,0,1)(1,1,1)[12] errors : -1331.833
Regression with ARIMA(1,0,1)(1,1,2)[12] errors : -1332.12
Regression with ARIMA(1,0,1)(1,1,2)[12] errors : -1326.497
Regression with ARIMA(1,0,1)(2,1,0)[12] errors : -1340.752
Regression with ARIMA(1,0,1)(2,1,0)[12] errors : -1335.173
Regression with ARIMA(1,0,1)(2,1,1)[12] errors : -1336.123
Regression with ARIMA(1,0,1)(2,1,1)[12] errors : -1330.561
Regression with ARIMA(1,0,2)(0,1,0)[12] errors : -1305.582
Regression with ARIMA(1,0,2)(0,1,0)[12] errors : -1299.984
Regression with ARIMA(1,0,2)(0,1,1)[12] errors : -1334.741
Regression with ARIMA(1,0,2)(0,1,1)[12] errors : -1329.14
Regression with ARIMA(1,0,2)(0,1,2)[12] errors : -1329.128
Regression with ARIMA(1,0,2)(0,1,2)[12] errors : -1323.527
Regression with ARIMA(1,0,2)(1,1,0)[12] errors : -1338.046
Regression with ARIMA(1,0,2)(1,1,0)[12] errors : -1332.453
Regression with ARIMA(1,0,2)(1,1,1)[12] errors : -1334.737
Regression with ARIMA(1,0,2)(1,1,1)[12] errors : -1329.14
Regression with ARIMA(1,0,2)(2,1,0)[12] errors : -1335.381
Regression with ARIMA(1,0,2)(2,1,0)[12] errors : -1329.809
Regression with ARIMA(1,0,3)(0,1,0)[12] errors : -1301.068
Regression with ARIMA(1,0,3)(0,1,0)[12] errors : -1295.476
Regression with ARIMA(1,0,3)(0,1,1)[12] errors : -1329.491
Regression with ARIMA(1,0,3)(0,1,1)[12] errors : -1323.904
Regression with ARIMA(1,0,3)(1,1,0)[12] errors : -1334.848
Regression with ARIMA(1,0,3)(1,1,0)[12] errors : -1329.297
Regression with ARIMA(1,0,4)(0,1,0)[12] errors : -1301.224
Regression with ARIMA(1,0,4)(0,1,0)[12] errors : -1295.597
Regression with ARIMA(2,0,0)(0,1,0)[12] errors : -1303.643
Regression with ARIMA(2,0,0)(0,1,0)[12] errors : -1298.05
Regression with ARIMA(2,0,0)(0,1,1)[12] errors : -1330.657
Regression with ARIMA(2,0,0)(0,1,1)[12] errors : -1325.067
Regression with ARIMA(2,0,0)(0,1,2)[12] errors : -1325.053
Regression with ARIMA(2,0,0)(0,1,2)[12] errors : -1319.463
Regression with ARIMA(2,0,0)(1,1,0)[12] errors : -1330.794
Regression with ARIMA(2,0,0)(1,1,0)[12] errors : -1325.196
Regression with ARIMA(2,0,0)(1,1,1)[12] errors : -1332.41
Regression with ARIMA(2,0,0)(1,1,1)[12] errors : -1326.788
Regression with ARIMA(2,0,0)(1,1,2)[12] errors : -1326.782
Regression with ARIMA(2,0,0)(1,1,2)[12] errors : -1321.161
Regression with ARIMA(2,0,0)(2,1,0)[12] errors : -1333.98
Regression with ARIMA(2,0,0)(2,1,0)[12] errors : -1328.384
Regression with ARIMA(2,0,0)(2,1,1)[12] errors : -1329.824
Regression with ARIMA(2,0,0)(2,1,1)[12] errors : -1324.245
Regression with ARIMA(2,0,1)(0,1,0)[12] errors : -1306.409
Regression with ARIMA(2,0,1)(0,1,0)[12] errors : -1300.824
Regression with ARIMA(2,0,1)(0,1,1)[12] errors : -1333.494
Regression with ARIMA(2,0,1)(0,1,1)[12] errors : -1327.923
Regression with ARIMA(2,0,1)(0,1,2)[12] errors : -1327.917
Regression with ARIMA(2,0,1)(0,1,2)[12] errors : -1322.347
Regression with ARIMA(2,0,1)(1,1,0)[12] errors : -1332.714
Regression with ARIMA(2,0,1)(1,1,0)[12] errors : -1327.113
Regression with ARIMA(2,0,1)(1,1,1)[12] errors : -1333.814
Regression with ARIMA(2,0,1)(1,1,1)[12] errors : -1328.196
Regression with ARIMA(2,0,1)(2,1,0)[12] errors : -1338.208
Regression with ARIMA(2,0,1)(2,1,0)[12] errors : -1332.617
Regression with ARIMA(2,0,2)(0,1,0)[12] errors : -1300.783
Regression with ARIMA(2,0,2)(0,1,0)[12] errors : -1295.198
Regression with ARIMA(2,0,2)(0,1,1)[12] errors : -1328.112
Regression with ARIMA(2,0,2)(0,1,1)[12] errors : -1322.546
Regression with ARIMA(2,0,2)(1,1,0)[12] errors : -1327.122
Regression with ARIMA(2,0,2)(1,1,0)[12] errors : -1321.521
Regression with ARIMA(2,0,3)(0,1,0)[12] errors : -1305.589
Regression with ARIMA(2,0,3)(0,1,0)[12] errors : -1300.296
Regression with ARIMA(3,0,0)(0,1,0)[12] errors : -1311.23
Regression with ARIMA(3,0,0)(0,1,0)[12] errors : -1305.612
Regression with ARIMA(3,0,0)(0,1,1)[12] errors : -1339.867
Regression with ARIMA(3,0,0)(0,1,1)[12] errors : -1334.246
Regression with ARIMA(3,0,0)(0,1,2)[12] errors : -1334.299
Regression with ARIMA(3,0,0)(0,1,2)[12] errors : -1328.677
Regression with ARIMA(3,0,0)(1,1,0)[12] errors : -1339.041
Regression with ARIMA(3,0,0)(1,1,0)[12] errors : -1333.42
Regression with ARIMA(3,0,0)(1,1,1)[12] errors : -1334.709
Regression with ARIMA(3,0,0)(1,1,1)[12] errors : -1329.083
Regression with ARIMA(3,0,0)(2,1,0)[12] errors : -1339.28
Regression with ARIMA(3,0,0)(2,1,0)[12] errors : -1333.672
Regression with ARIMA(3,0,1)(0,1,0)[12] errors : -1305.602
Regression with ARIMA(3,0,1)(0,1,0)[12] errors : -1299.985
Regression with ARIMA(3,0,1)(0,1,1)[12] errors : -1335.307
Regression with ARIMA(3,0,1)(0,1,1)[12] errors : -1329.68
Regression with ARIMA(3,0,1)(1,1,0)[12] errors : -1337.655
Regression with ARIMA(3,0,1)(1,1,0)[12] errors : -1332.075
Regression with ARIMA(3,0,2)(0,1,0)[12] errors : -1300.103
Regression with ARIMA(3,0,2)(0,1,0)[12] errors : -1294.485
Regression with ARIMA(4,0,0)(0,1,0)[12] errors : -1304.931
Regression with ARIMA(4,0,0)(0,1,0)[12] errors : -1299.308
Regression with ARIMA(4,0,0)(0,1,1)[12] errors : -1334.141
Regression with ARIMA(4,0,0)(0,1,1)[12] errors : -1328.514
Regression with ARIMA(4,0,0)(1,1,0)[12] errors : -1336.269
Regression with ARIMA(4,0,0)(1,1,0)[12] errors : -1330.643
Regression with ARIMA(4,0,1)(0,1,0)[12] errors : -1299.898
Regression with ARIMA(4,0,1)(0,1,0)[12] errors : -1294.273
Regression with ARIMA(5,0,0)(0,1,0)[12] errors : -1301.005
Regression with ARIMA(5,0,0)(0,1,0)[12] errors : -1295.405
Now re-fitting the best model(s) without approximations...
Best model: Regression with ARIMA(0,0,1)(2,1,0)[12] errors
# Check AR/MA terms for later use in the evaluation part Retail EU
forecast::auto.arima(data$Retail_EU_cycle,
ic="bic",
xreg = pandemicDummies["2000-02-01/2024-03-01"],
max.d = 0,
trace = TRUE,
stepwise = FALSE)
Fitting models using approximations to speed things up...
Regression with ARIMA(0,0,0) errors : -1453.484
Regression with ARIMA(0,0,0) errors : -1447.836
Regression with ARIMA(0,0,1) errors : -1510.089
Regression with ARIMA(0,0,1) errors : -1504.624
Regression with ARIMA(0,0,2) errors : -1507.769
Regression with ARIMA(0,0,2) errors : -1502.368
Regression with ARIMA(0,0,3) errors : -1507.425
Regression with ARIMA(0,0,3) errors : -1502.021
Regression with ARIMA(0,0,4) errors : -1508.286
Regression with ARIMA(0,0,4) errors : -1502.808
Regression with ARIMA(0,0,5) errors : -1512.158
Regression with ARIMA(0,0,5) errors : -1506.763
Regression with ARIMA(1,0,0) errors : -1494.178
Regression with ARIMA(1,0,0) errors : -1488.584
Regression with ARIMA(1,0,1) errors : -1509.802
Regression with ARIMA(1,0,1) errors : -1504.541
Regression with ARIMA(1,0,2) errors : -1505.937
Regression with ARIMA(1,0,2) errors : -1500.749
Regression with ARIMA(1,0,3) errors : -1503.522
Regression with ARIMA(1,0,3) errors : -1498.223
Regression with ARIMA(1,0,4) errors : -1508.315
Regression with ARIMA(1,0,4) errors : -1502.912
Regression with ARIMA(2,0,0) errors : -1495.053
Regression with ARIMA(2,0,0) errors : -1489.494
Regression with ARIMA(2,0,1) errors : -1505.06
Regression with ARIMA(2,0,1) errors : -1499.757
Regression with ARIMA(2,0,2) errors : -1499.51
Regression with ARIMA(2,0,2) errors : -1494.211
Regression with ARIMA(2,0,3) errors : -1514.992
Regression with ARIMA(2,0,3) errors : -1509.534
Regression with ARIMA(3,0,0) errors : -1489.139
Regression with ARIMA(3,0,0) errors : -1483.625
Regression with ARIMA(3,0,1) errors : -1499.847
Regression with ARIMA(3,0,1) errors : -1494.748
Regression with ARIMA(3,0,2) errors : -1498.164
Regression with ARIMA(3,0,2) errors : -1492.968
Regression with ARIMA(4,0,0) errors : -1509.368
Regression with ARIMA(4,0,0) errors : -1503.954
Regression with ARIMA(4,0,1) errors : -1506.854
Regression with ARIMA(4,0,1) errors : -1501.509
Regression with ARIMA(5,0,0) errors : -1505.04
Regression with ARIMA(5,0,0) errors : -1499.666
Now re-fitting the best model(s) without approximations...
Best model: Regression with ARIMA(2,0,3) errors
Series: data$Retail_EU_cycle
Regression with ARIMA(2,0,3) errors
Coefficients:
ar1 ar2 ma1 ma2 ma3 Series 1 Series 2 Series 3 Series 4 Series 5 Series 6 Series 7
0.9429 -0.9514 -1.4912 1.5194 -0.6537 0.0040 0.0232 0.0518 -0.0522 0.0351 -0.0309 -0.0223
s.e. 0.0309 0.0247 0.0489 0.0505 0.0505 0.0127 0.0145 0.0145 0.0145 0.0146 0.0146 0.0146
Series 8 Series 9 Series 10 Series 11 Series 12 Series 13 Series 14 Series 15 Series 16 Series 17
0.0459 -0.0333 0.0261 -0.0126 0.0009 0.0169 0.0009 0.0159 -0.0062 -0.0003
s.e. 0.0146 0.0146 0.0146 0.0147 0.0147 0.0147 0.0147 0.0147 0.0147 0.0147
Series 18 Series 19 Series 20 Series 21 Series 22 Series 23 Series 24
-0.0193 -0.0311 0.0240 -0.0124 0.0098 0.0075 -0.0148
s.e. 0.0146 0.0146 0.0146 0.0146 0.0145 0.0146 0.0128
sigma^2 = 0.0001808: log likelihood = 851.62
AIC=-1643.24 AICc=-1636.06 BIC=-1533.15
# Check AR/MA terms for later use in the evaluation part CHF/EUR
forecast::auto.arima(data$df_CHFEUR,
ic="bic",
xreg = pandemicDummies["2000-02-01/2024-03-01"],
max.d = 0,
trace = TRUE,
stepwise = FALSE)
Fitting models using approximations to speed things up...
Regression with ARIMA(0,0,0) errors : -1552.588
Regression with ARIMA(0,0,0) errors : -1551.689
Regression with ARIMA(0,0,1) errors : -1557.692
Regression with ARIMA(0,0,1) errors : -1555.399
Regression with ARIMA(0,0,2) errors : -1553.445
Regression with ARIMA(0,0,2) errors : -1551.725
Regression with ARIMA(0,0,3) errors : -1551.227
Regression with ARIMA(0,0,3) errors : -1548.755
Regression with ARIMA(0,0,4) errors : -1546.827
Regression with ARIMA(0,0,4) errors : -1544.76
Regression with ARIMA(0,0,5) errors : -1541.179
Regression with ARIMA(0,0,5) errors : -1539.092
Regression with ARIMA(1,0,0) errors : -1555.467
Regression with ARIMA(1,0,0) errors : -1553.086
Regression with ARIMA(1,0,1) errors : -1555.438
Regression with ARIMA(1,0,1) errors : -1553.607
Regression with ARIMA(1,0,2) errors : -1549.956
Regression with ARIMA(1,0,2) errors : -1547.989
Regression with ARIMA(1,0,3) errors : -1545.542
Regression with ARIMA(1,0,3) errors : -1543.13
Regression with ARIMA(1,0,4) errors : -1540.183
Regression with ARIMA(1,0,4) errors : -1538.09
Regression with ARIMA(2,0,0) errors : -1549.641
Regression with ARIMA(2,0,0) errors : -1547.723
Regression with ARIMA(2,0,1) errors : -1548.821
Regression with ARIMA(2,0,1) errors : -1547.024
Regression with ARIMA(2,0,2) errors : -1544.822
Regression with ARIMA(2,0,2) errors : -1541.499
Regression with ARIMA(2,0,3) errors : -1541.91
Regression with ARIMA(2,0,3) errors : -1540.843
Regression with ARIMA(3,0,0) errors : -1547.781
Regression with ARIMA(3,0,0) errors : -1544.951
Regression with ARIMA(3,0,1) errors : -1543.676
Regression with ARIMA(3,0,1) errors : -1541.083
Regression with ARIMA(3,0,2) errors : -1539.063
Regression with ARIMA(3,0,2) errors : -1535.88
Regression with ARIMA(4,0,0) errors : -1544.283
Regression with ARIMA(4,0,0) errors : -1542.051
Regression with ARIMA(4,0,1) errors : -1540.655
Regression with ARIMA(4,0,1) errors : -1538.239
Regression with ARIMA(5,0,0) errors : -1540.108
Regression with ARIMA(5,0,0) errors : -1537.331
Now re-fitting the best model(s) without approximations...
Best model: Regression with ARIMA(0,0,1) errors
Series: data$df_CHFEUR
Regression with ARIMA(0,0,1) errors
Coefficients:
ma1 Series 1 Series 2 Series 3 Series 4 Series 5 Series 6 Series 7 Series 8 Series 9 Series 10
0.2081 -0.0145 -0.0106 -0.0057 -0.0044 0.0022 0.0141 -0.0011 0.0058 0.0015 -0.0041
s.e. 0.0635 0.0128 0.0131 0.0131 0.0131 0.0131 0.0131 0.0131 0.0131 0.0131 0.0131
Series 11 Series 12 Series 13 Series 14 Series 15 Series 16 Series 17 Series 18 Series 19 Series 20
0.0037 0.0033 -0.0021 0.0058 0.0189 -0.0027 -0.0059 -0.0026 -0.0079 -0.0087
s.e. 0.0131 0.0131 0.0131 0.0131 0.0131 0.0131 0.0131 0.0131 0.0131 0.0131
Series 21 Series 22 Series 23 Series 24
0.0092 -0.0135 -0.0181 -0.0103
s.e. 0.0131 0.0131 0.0131 0.0128
sigma^2 = 0.0001791: log likelihood = 852.53
AIC=-1653.07 AICc=-1647.73 BIC=-1557.65
# Check AR/MA terms for later use in the evaluation part Retail EU AND CHF/EUR
forecast::auto.arima(data$Retail_sales_cycle,
ic="bic",
xreg = cbind(pandemicDummies["2000-02-01/2024-03-01"],
data$Retail_EU_cycle,
data$df_CHFEUR),
max.d = 0,
trace = TRUE,
stepwise = FALSE)
Fitting models using approximations to speed things up...
Regression with ARIMA(0,0,0) errors : -1244.49
Regression with ARIMA(0,0,0) errors : -1238.843
Regression with ARIMA(0,0,1) errors : -1345.976
Regression with ARIMA(0,0,1) errors : -1340.322
Regression with ARIMA(0,0,2) errors : -1343.305
Regression with ARIMA(0,0,2) errors : -1337.65
Regression with ARIMA(0,0,3) errors : -1342.721
Regression with ARIMA(0,0,3) errors : -1337.073
Regression with ARIMA(0,0,4) errors : -1337.122
Regression with ARIMA(0,0,4) errors : -1331.474
Regression with ARIMA(0,0,5) errors : -1331.66
Regression with ARIMA(0,0,5) errors : -1326.015
Regression with ARIMA(1,0,0) errors : -1286.677
Regression with ARIMA(1,0,0) errors : -1281.01
Regression with ARIMA(1,0,1) errors : -1337.999
Regression with ARIMA(1,0,1) errors : -1332.407
Regression with ARIMA(1,0,2) errors : -1344.05
Regression with ARIMA(1,0,2) errors : -1338.446
Regression with ARIMA(1,0,3) errors : -1338.459
Regression with ARIMA(1,0,3) errors : -1332.857
Regression with ARIMA(1,0,4) errors : -1333.894
Regression with ARIMA(1,0,4) errors : -1328.284
Regression with ARIMA(2,0,0) errors : -1327.212
Regression with ARIMA(2,0,0) errors : -1321.55
Regression with ARIMA(2,0,1) errors : -1340.255
Regression with ARIMA(2,0,1) errors : -1334.585
Regression with ARIMA(2,0,2) errors : -1341.744
Regression with ARIMA(2,0,2) errors : -1336.085
Regression with ARIMA(2,0,3) errors : -1347.059
Regression with ARIMA(2,0,3) errors : -1339.645
Regression with ARIMA(3,0,0) errors : -1332.447
Regression with ARIMA(3,0,0) errors : -1326.778
Regression with ARIMA(3,0,1) errors : -1336.363
Regression with ARIMA(3,0,1) errors : -1330.751
Regression with ARIMA(3,0,2) errors : -1335.994
Regression with ARIMA(3,0,2) errors : -1330.372
Regression with ARIMA(4,0,0) errors : -1335.228
Regression with ARIMA(4,0,0) errors : -1329.564
Regression with ARIMA(4,0,1) errors : -1338.631
Regression with ARIMA(4,0,1) errors : -1332.978
Regression with ARIMA(5,0,0) errors : -1343.013
Regression with ARIMA(5,0,0) errors : -1337.343
Now re-fitting the best model(s) without approximations...
Regression with ARIMA(0,0,0) errors : -1244.49
Regression with ARIMA(0,0,0) errors : -1238.843
Regression with ARIMA(0,0,1) errors : -1345.454
Regression with ARIMA(0,0,1) errors : -1339.809
Regression with ARIMA(0,0,2) errors : -1342.768
Regression with ARIMA(0,0,2) errors : -1337.122
Regression with ARIMA(0,0,3) errors : -1342.083
Regression with ARIMA(0,0,3) errors : -1336.438
Regression with ARIMA(0,0,4) errors : -1336.528
Regression with ARIMA(0,0,4) errors : -1330.885
Regression with ARIMA(0,0,5) errors : -1331.074
Regression with ARIMA(0,0,5) errors : -1325.432
Regression with ARIMA(1,0,0) errors : -1285.353
Regression with ARIMA(1,0,0) errors : -1279.695
Regression with ARIMA(1,0,1) errors : -1341.948
Regression with ARIMA(1,0,1) errors : -1336.303
Regression with ARIMA(1,0,2) errors : -1341.158
Regression with ARIMA(1,0,2) errors : -1335.517
Regression with ARIMA(1,0,3) errors : -1336.573
Regression with ARIMA(1,0,3) errors : -1330.93
Regression with ARIMA(1,0,4) errors : -1330.91
Regression with ARIMA(1,0,4) errors : -1325.267
Regression with ARIMA(2,0,0) errors : -1322.544
Regression with ARIMA(2,0,0) errors : -1316.876
Regression with ARIMA(2,0,1) errors : -1341.004
Regression with ARIMA(2,0,1) errors : -1335.358
Regression with ARIMA(2,0,2) errors : -1336.522
Regression with ARIMA(2,0,2) errors : -1330.879
Regression with ARIMA(2,0,3) errors : Inf
Regression with ARIMA(2,0,3) errors : Inf
Regression with ARIMA(3,0,0) errors : -1324.756
Regression with ARIMA(3,0,0) errors : -1319.086
Regression with ARIMA(3,0,1) errors : -1335.958
Regression with ARIMA(3,0,1) errors : -1330.312
Regression with ARIMA(3,0,2) errors : -1330.861
Regression with ARIMA(3,0,2) errors : -1325.219
Regression with ARIMA(4,0,0) errors : -1328.487
Regression with ARIMA(4,0,0) errors : -1322.82
Regression with ARIMA(4,0,1) errors : -1331.332
Regression with ARIMA(4,0,1) errors : -1325.688
Regression with ARIMA(5,0,0) errors : -1331.526
Regression with ARIMA(5,0,0) errors : -1325.863
Best model: Regression with ARIMA(0,0,1) errors
Series: data$Retail_sales_cycle
Regression with ARIMA(0,0,1) errors
Coefficients:
ma1 Series.1 Series.2 Series.3 Series.4 Series.5 Series.6 Series.7 Series.8 Series.9 Series.10
-0.7472 -0.0216 -0.0002 -0.0742 -0.1189 0.2418 0.0244 -0.0176 -0.0322 -0.0193 0.0400
s.e. 0.0381 0.0181 0.0226 0.0228 0.0230 0.0227 0.0227 0.0226 0.0228 0.0227 0.0226
Series.11 Series.12 Series.13 Series.14 Series.15 Series.16 Series.17 Series.18 Series.19 Series.20
-0.0069 0.0122 -0.0903 -0.0564 0.2190 -0.0190 -0.0462 0.0019 -0.0412 0.0051
s.e. 0.0226 0.0226 0.0226 0.0226 0.0226 0.0226 0.0226 0.0226 0.0226 0.0226
Series.21 Series.22 Series.23 Series.24 Retail_EU_cycle df_CHFEUR
-0.0092 0.0392 0.0166 -0.0366 0.3031 0.0377
s.e. 0.0226 0.0226 0.0226 0.0181 0.0749 0.0473
sigma^2 = 0.0003598: log likelihood = 752.11
AIC=-1448.21 AICc=-1441.99 BIC=-1345.45
Model and plot forecast for Retail EU
modelretaileu <- forecast::auto.arima(ts_ts(data$df_Retail_EU),
xreg = pandemicDummies["2000-02-01/2024-03-01"],
ic = "bic",
trace = TRUE,
stepwise = FALSE
)
Fitting models using approximations to speed things up...
Regression with ARIMA(0,0,0)(0,1,0)[12] errors : -1375.828
Regression with ARIMA(0,0,0)(0,1,0)[12] errors : -1370.212
Regression with ARIMA(0,0,0)(0,1,1)[12] errors : -1439.981
Regression with ARIMA(0,0,0)(0,1,1)[12] errors : -1434.534
Regression with ARIMA(0,0,0)(0,1,2)[12] errors : -1435.801
Regression with ARIMA(0,0,0)(0,1,2)[12] errors : -1430.349
Regression with ARIMA(0,0,0)(1,1,0)[12] errors : -1431.404
Regression with ARIMA(0,0,0)(1,1,0)[12] errors : -1425.797
Regression with ARIMA(0,0,0)(1,1,1)[12] errors : -1439.023
Regression with ARIMA(0,0,0)(1,1,1)[12] errors : -1433.446
Regression with ARIMA(0,0,0)(1,1,2)[12] errors : -1434.046
Regression with ARIMA(0,0,0)(1,1,2)[12] errors : -1428.477
Regression with ARIMA(0,0,0)(2,1,0)[12] errors : -1443.138
Regression with ARIMA(0,0,0)(2,1,0)[12] errors : -1437.644
Regression with ARIMA(0,0,0)(2,1,1)[12] errors : -1439.002
Regression with ARIMA(0,0,0)(2,1,1)[12] errors : -1433.552
Regression with ARIMA(0,0,0)(2,1,2)[12] errors : -1433.999
Regression with ARIMA(0,0,0)(2,1,2)[12] errors : -1428.564
Regression with ARIMA(0,0,1)(0,1,0)[12] errors : -1479.329
Regression with ARIMA(0,0,1)(0,1,0)[12] errors : -1473.944
Regression with ARIMA(0,0,1)(0,1,1)[12] errors : -1523.343
Regression with ARIMA(0,0,1)(0,1,1)[12] errors : -1519.105
Regression with ARIMA(0,0,1)(0,1,2)[12] errors : -1517.815
Regression with ARIMA(0,0,1)(0,1,2)[12] errors : -1513.565
Regression with ARIMA(0,0,1)(1,1,0)[12] errors : -1511.938
Regression with ARIMA(0,0,1)(1,1,0)[12] errors : -1506.614
Regression with ARIMA(0,0,1)(1,1,1)[12] errors : -1514.147
Regression with ARIMA(0,0,1)(1,1,1)[12] errors : -1508.904
Regression with ARIMA(0,0,1)(1,1,2)[12] errors : -1511.651
Regression with ARIMA(0,0,1)(1,1,2)[12] errors : -1506.538
Regression with ARIMA(0,0,1)(2,1,0)[12] errors : -1517.277
Regression with ARIMA(0,0,1)(2,1,0)[12] errors : -1512.56
Regression with ARIMA(0,0,1)(2,1,1)[12] errors : -1512.749
Regression with ARIMA(0,0,1)(2,1,1)[12] errors : -1508.186
Regression with ARIMA(0,0,1)(2,1,2)[12] errors : -1507.136
Regression with ARIMA(0,0,1)(2,1,2)[12] errors : -1502.573
Regression with ARIMA(0,0,2)(0,1,0)[12] errors : -1478.913
Regression with ARIMA(0,0,2)(0,1,0)[12] errors : -1473.48
Regression with ARIMA(0,0,2)(0,1,1)[12] errors : -1520.007
Regression with ARIMA(0,0,2)(0,1,1)[12] errors : -1515.547
Regression with ARIMA(0,0,2)(0,1,2)[12] errors : -1514.41
Regression with ARIMA(0,0,2)(0,1,2)[12] errors : -1509.947
Regression with ARIMA(0,0,2)(1,1,0)[12] errors : -1507.428
Regression with ARIMA(0,0,2)(1,1,0)[12] errors : -1502.052
Regression with ARIMA(0,0,2)(1,1,1)[12] errors : -1509.236
Regression with ARIMA(0,0,2)(1,1,1)[12] errors : -1503.945
Regression with ARIMA(0,0,2)(1,1,2)[12] errors : -1507.038
Regression with ARIMA(0,0,2)(1,1,2)[12] errors : -1501.858
Regression with ARIMA(0,0,2)(2,1,0)[12] errors : -1512.546
Regression with ARIMA(0,0,2)(2,1,0)[12] errors : -1507.746
Regression with ARIMA(0,0,2)(2,1,1)[12] errors : -1508.087
Regression with ARIMA(0,0,2)(2,1,1)[12] errors : -1503.428
Regression with ARIMA(0,0,3)(0,1,0)[12] errors : -1473.661
Regression with ARIMA(0,0,3)(0,1,0)[12] errors : -1468.217
Regression with ARIMA(0,0,3)(0,1,1)[12] errors : -1514.593
Regression with ARIMA(0,0,3)(0,1,1)[12] errors : -1510.078
Regression with ARIMA(0,0,3)(0,1,2)[12] errors : -1509.007
Regression with ARIMA(0,0,3)(0,1,2)[12] errors : -1504.487
Regression with ARIMA(0,0,3)(1,1,0)[12] errors : -1502.956
Regression with ARIMA(0,0,3)(1,1,0)[12] errors : -1497.543
Regression with ARIMA(0,0,3)(1,1,1)[12] errors : -1505.081
Regression with ARIMA(0,0,3)(1,1,1)[12] errors : -1499.749
Regression with ARIMA(0,0,3)(2,1,0)[12] errors : -1508.239
Regression with ARIMA(0,0,3)(2,1,0)[12] errors : -1503.372
Regression with ARIMA(0,0,4)(0,1,0)[12] errors : -1468.166
Regression with ARIMA(0,0,4)(0,1,0)[12] errors : -1462.732
Regression with ARIMA(0,0,4)(0,1,1)[12] errors : -1509.201
Regression with ARIMA(0,0,4)(0,1,1)[12] errors : -1504.75
Regression with ARIMA(0,0,4)(1,1,0)[12] errors : -1498.588
Regression with ARIMA(0,0,4)(1,1,0)[12] errors : -1493.229
Regression with ARIMA(0,0,5)(0,1,0)[12] errors : -1469.489
Regression with ARIMA(0,0,5)(0,1,0)[12] errors : -1463.986
Regression with ARIMA(1,0,0)(0,1,0)[12] errors : -1453.501
Regression with ARIMA(1,0,0)(0,1,0)[12] errors : -1447.925
Regression with ARIMA(1,0,0)(0,1,1)[12] errors : -1503.526
Regression with ARIMA(1,0,0)(0,1,1)[12] errors : -1498.377
Regression with ARIMA(1,0,0)(0,1,2)[12] errors : -1498.009
Regression with ARIMA(1,0,0)(0,1,2)[12] errors : -1492.859
Regression with ARIMA(1,0,0)(1,1,0)[12] errors : -1490.335
Regression with ARIMA(1,0,0)(1,1,0)[12] errors : -1484.829
Regression with ARIMA(1,0,0)(1,1,1)[12] errors : -1493.812
Regression with ARIMA(1,0,0)(1,1,1)[12] errors : -1488.393
Regression with ARIMA(1,0,0)(1,1,2)[12] errors : -1490.272
Regression with ARIMA(1,0,0)(1,1,2)[12] errors : -1484.883
Regression with ARIMA(1,0,0)(2,1,0)[12] errors : -1494.169
Regression with ARIMA(1,0,0)(2,1,0)[12] errors : -1488.889
Regression with ARIMA(1,0,0)(2,1,1)[12] errors : -1491.281
Regression with ARIMA(1,0,0)(2,1,1)[12] errors : -1486.057
Regression with ARIMA(1,0,0)(2,1,2)[12] errors : -1486.651
Regression with ARIMA(1,0,0)(2,1,2)[12] errors : -1481.459
Regression with ARIMA(1,0,1)(0,1,0)[12] errors : -1477.687
Regression with ARIMA(1,0,1)(0,1,0)[12] errors : -1472.237
Regression with ARIMA(1,0,1)(0,1,1)[12] errors : -1519.257
Regression with ARIMA(1,0,1)(0,1,1)[12] errors : -1514.757
Regression with ARIMA(1,0,1)(0,1,2)[12] errors : -1513.653
Regression with ARIMA(1,0,1)(0,1,2)[12] errors : -1509.151
Regression with ARIMA(1,0,1)(1,1,0)[12] errors : -1510.102
Regression with ARIMA(1,0,1)(1,1,0)[12] errors : -1504.918
Regression with ARIMA(1,0,1)(1,1,1)[12] errors : -1512.182
Regression with ARIMA(1,0,1)(1,1,1)[12] errors : -1507.215
Regression with ARIMA(1,0,1)(1,1,2)[12] errors : -1509.107
Regression with ARIMA(1,0,1)(1,1,2)[12] errors : -1504.232
Regression with ARIMA(1,0,1)(2,1,0)[12] errors : -1511.038
Regression with ARIMA(1,0,1)(2,1,0)[12] errors : -1506.224
Regression with ARIMA(1,0,1)(2,1,1)[12] errors : -1507.938
Regression with ARIMA(1,0,1)(2,1,1)[12] errors : -1503.259
Regression with ARIMA(1,0,2)(0,1,0)[12] errors : -1475.733
Regression with ARIMA(1,0,2)(0,1,0)[12] errors : -1470.106
Regression with ARIMA(1,0,2)(0,1,1)[12] errors : -1516.329
Regression with ARIMA(1,0,2)(0,1,1)[12] errors : -1510.938
Regression with ARIMA(1,0,2)(0,1,2)[12] errors : -1510.702
Regression with ARIMA(1,0,2)(0,1,2)[12] errors : -1505.313
Regression with ARIMA(1,0,2)(1,1,0)[12] errors : -1504.502
Regression with ARIMA(1,0,2)(1,1,0)[12] errors : -1499.318
Regression with ARIMA(1,0,2)(1,1,1)[12] errors : -1506.557
Regression with ARIMA(1,0,2)(1,1,1)[12] errors : -1501.59
Regression with ARIMA(1,0,2)(2,1,0)[12] errors : -1507.612
Regression with ARIMA(1,0,2)(2,1,0)[12] errors : -1502.144
Regression with ARIMA(1,0,3)(0,1,0)[12] errors : -1469.753
Regression with ARIMA(1,0,3)(0,1,0)[12] errors : -1464.376
Regression with ARIMA(1,0,3)(0,1,1)[12] errors : -1508.748
Regression with ARIMA(1,0,3)(0,1,1)[12] errors : -1504.171
Regression with ARIMA(1,0,3)(1,1,0)[12] errors : -1502.151
Regression with ARIMA(1,0,3)(1,1,0)[12] errors : -1496.851
Regression with ARIMA(1,0,4)(0,1,0)[12] errors : -1464.393
Regression with ARIMA(1,0,4)(0,1,0)[12] errors : -1459.013
Regression with ARIMA(2,0,0)(0,1,0)[12] errors : -1476.896
Regression with ARIMA(2,0,0)(0,1,0)[12] errors : -1471.375
Regression with ARIMA(2,0,0)(0,1,1)[12] errors : -1518.193
Regression with ARIMA(2,0,0)(0,1,1)[12] errors : -1513.281
Regression with ARIMA(2,0,0)(0,1,2)[12] errors : -1512.631
Regression with ARIMA(2,0,0)(0,1,2)[12] errors : -1507.719
Regression with ARIMA(2,0,0)(1,1,0)[12] errors : -1511.143
Regression with ARIMA(2,0,0)(1,1,0)[12] errors : -1505.75
Regression with ARIMA(2,0,0)(1,1,1)[12] errors : -1513.664
Regression with ARIMA(2,0,0)(1,1,1)[12] errors : -1508.416
Regression with ARIMA(2,0,0)(1,1,2)[12] errors : -1509.94
Regression with ARIMA(2,0,0)(1,1,2)[12] errors : -1504.737
Regression with ARIMA(2,0,0)(2,1,0)[12] errors : -1512.986
Regression with ARIMA(2,0,0)(2,1,0)[12] errors : -1507.919
Regression with ARIMA(2,0,0)(2,1,1)[12] errors : -1508.536
Regression with ARIMA(2,0,0)(2,1,1)[12] errors : -1503.529
Regression with ARIMA(2,0,1)(0,1,0)[12] errors : -1473.196
Regression with ARIMA(2,0,1)(0,1,0)[12] errors : -1467.703
Regression with ARIMA(2,0,1)(0,1,1)[12] errors : -1513.983
Regression with ARIMA(2,0,1)(0,1,1)[12] errors : -1509.287
Regression with ARIMA(2,0,1)(0,1,2)[12] errors : -1508.388
Regression with ARIMA(2,0,1)(0,1,2)[12] errors : -1503.691
Regression with ARIMA(2,0,1)(1,1,0)[12] errors : -1505.723
Regression with ARIMA(2,0,1)(1,1,0)[12] errors : -1500.382
Regression with ARIMA(2,0,1)(1,1,1)[12] errors : -1508.122
Regression with ARIMA(2,0,1)(1,1,1)[12] errors : -1502.928
Regression with ARIMA(2,0,1)(2,1,0)[12] errors : -1508.018
Regression with ARIMA(2,0,1)(2,1,0)[12] errors : -1503.037
Regression with ARIMA(2,0,2)(0,1,0)[12] errors : -1476.529
Regression with ARIMA(2,0,2)(0,1,0)[12] errors : -1471.002
Regression with ARIMA(2,0,2)(0,1,1)[12] errors : -1512.144
Regression with ARIMA(2,0,2)(0,1,1)[12] errors : -1507.416
Regression with ARIMA(2,0,2)(1,1,0)[12] errors : -1502.403
Regression with ARIMA(2,0,2)(1,1,0)[12] errors : -1497.115
Regression with ARIMA(2,0,3)(0,1,0)[12] errors : Inf
Regression with ARIMA(2,0,3)(0,1,0)[12] errors : -1465.432
Regression with ARIMA(3,0,0)(0,1,0)[12] errors : -1471.297
Regression with ARIMA(3,0,0)(0,1,0)[12] errors : -1465.762
Regression with ARIMA(3,0,0)(0,1,1)[12] errors : -1512.35
Regression with ARIMA(3,0,0)(0,1,1)[12] errors : -1507.415
Regression with ARIMA(3,0,0)(0,1,2)[12] errors : -1506.769
Regression with ARIMA(3,0,0)(0,1,2)[12] errors : -1501.834
Regression with ARIMA(3,0,0)(1,1,0)[12] errors : -1504.766
Regression with ARIMA(3,0,0)(1,1,0)[12] errors : -1499.412
Regression with ARIMA(3,0,0)(1,1,1)[12] errors : -1506.926
Regression with ARIMA(3,0,0)(1,1,1)[12] errors : -1501.723
Regression with ARIMA(3,0,0)(2,1,0)[12] errors : -1507.736
Regression with ARIMA(3,0,0)(2,1,0)[12] errors : -1502.583
Regression with ARIMA(3,0,1)(0,1,0)[12] errors : -1467.838
Regression with ARIMA(3,0,1)(0,1,0)[12] errors : -1462.31
Regression with ARIMA(3,0,1)(0,1,1)[12] errors : -1508.471
Regression with ARIMA(3,0,1)(0,1,1)[12] errors : -1503.65
Regression with ARIMA(3,0,1)(1,1,0)[12] errors : -1500.488
Regression with ARIMA(3,0,1)(1,1,0)[12] errors : -1495.295
Regression with ARIMA(3,0,2)(0,1,0)[12] errors : -1463.123
Regression with ARIMA(3,0,2)(0,1,0)[12] errors : -1457.612
Regression with ARIMA(4,0,0)(0,1,0)[12] errors : -1469.169
Regression with ARIMA(4,0,0)(0,1,0)[12] errors : -1463.642
Regression with ARIMA(4,0,0)(0,1,1)[12] errors : -1509.541
Regression with ARIMA(4,0,0)(0,1,1)[12] errors : -1504.718
Regression with ARIMA(4,0,0)(1,1,0)[12] errors : -1502.171
Regression with ARIMA(4,0,0)(1,1,0)[12] errors : -1496.891
Regression with ARIMA(4,0,1)(0,1,0)[12] errors : -1463.776
Regression with ARIMA(4,0,1)(0,1,0)[12] errors : -1458.258
Regression with ARIMA(5,0,0)(0,1,0)[12] errors : -1464.185
Regression with ARIMA(5,0,0)(0,1,0)[12] errors : -1458.715
Now re-fitting the best model(s) without approximations...
Best model: Regression with ARIMA(0,0,1)(0,1,1)[12] errors
modelretaileu$bic
[1] -1627.673
forecasteu <- forecast::forecast(modelretaileu,
xreg = pandemicDummies["2024-04-01/2025-03-01"])
plot(forecasteu)
Forecast Swiss Retail with exogneous variable Euro Retail
forecastretail <- forecast::forecast(modelretailsales,
xreg = cbind(pandemicDummies["2024-04-01/2025-03-01"],
forecasteu$mean))
plot(forecastretail)
Reverse the differencing and log to get a point forecast of the index level. Add on to the last observed value and convert back to the original scale.
cumulative_forecasted_diffs <- cumsum(forecastretail$mean[1:12])
forecasted_series_final <- cumulative_forecasted_diffs + log(tail(data$Retail_sales, 1)[[1]])
forecasted_series_original_scale <- exp(forecasted_series_final)
print(forecasted_series_original_scale)
Apr 2024 May 2024 Jun 2024 Jul 2024 Aug 2024 Sep 2024 Oct 2024 Nov 2024 Dec 2024 Jan 2025 Feb 2025 Mar 2025
102.08462 109.29603 107.48698 105.17001 100.48072 101.09442 106.18451 114.25884 127.25783 99.81850 94.51278 107.49569
Now for evaluation and for simplicity only use the data before the pandemic and non seasonal model. 6 models are evaluated and the AR/MA terms that have been determined in the previous analysis. 1) Univariate m/m 2) Univariate y/y 3) Multivariate with Retail EU 4) Multivariate with Retail EU AND CHF/EUR 5) Naive “no change” 6) Average of the above 5 models
dataeval <- data[as.Date(index(data)) <= as.Date("2020-01-01"), ]
tEvaluationPeriods <- 70
tPeriods = length(dataeval[,"Retail_sales"])
forecastHorizon = 12
nModels = 6 # we compare these models: univariate m/m, y/y, multivariate with EU Retail, CHFEUR, naive, average
forecastRolling <- matrix(,tEvaluationPeriods,nModels)
for (tauEvaluationPeriod in 1:tEvaluationPeriods){
lastPeriod <- tPeriods-tEvaluationPeriods+tauEvaluationPeriod-forecastHorizon
# Univariate model, m/m
modelRetail_temp <- forecast::Arima(ts_ts(dataeval$df_Retail_sales[1:lastPeriod]),
order = c(0, 0, 1), seasonal=c(2, 1, 1))
forecastRetail_temp <- forecast::forecast(modelRetail_temp, h = forecastHorizon)
forecastRolling[tauEvaluationPeriod,1] <- sum(forecastRetail_temp$mean[1:forecastHorizon]) # y/y forecast is sum of m/m (with logs)
# Univariate model, y/y
modelRetail_temp = forecast::Arima(dataeval$df12_Retail_sales[12:lastPeriod],
order = c(1, 0, 1))
forecastRetail_temp = forecast::forecast(modelRetail_temp, h = forecastHorizon)
forecastRolling[tauEvaluationPeriod,2] <- forecastRetail_temp$mean[forecastHorizon]
# Multivariate model
modelRetailExo_temp = forecast::Arima(ts_ts(dataeval$df_Retail_sales[1:lastPeriod]),
order = c(0, 0, 1), seasonal=c(2, 1, 0),
xreg = dataeval$df_Retail_EU[1:lastPeriod])
modelRetaileu_temp <- forecast::Arima(ts_ts(dataeval$df_Retail_EU[1:lastPeriod]),
order = c(0, 0, 1), seasonal=c(0, 1, 1))
forecasteu_temp <- forecast::forecast(modelRetaileu_temp,
h = forecastHorizon)
forecastRetail_temp <- forecast::forecast(modelRetailExo_temp,
xreg = forecasteu_temp$mean,
h = forecastHorizon)
forecastRolling[tauEvaluationPeriod,3] <- sum(forecastRetail_temp$mean[1:forecastHorizon])
# Multivariate with Retail EU and CHFEUR
modelRetailExo_temp = forecast::Arima(ts_ts(dataeval$df_Retail_sales[1:lastPeriod]),
order = c(1, 0, 1), seasonal=c(2, 1, 0),
xreg = cbind(dataeval$df_Retail_EU[1:lastPeriod],
dataeval$df_CHFEUR[1:lastPeriod]))
modelRetaileu_temp <- forecast::Arima(ts_ts(dataeval$df_Retail_sales[1:lastPeriod]),
order = c(0, 0, 1), seasonal=c(0, 1, 1))
modelCHFEUR_temp <- forecast::Arima(ts_ts(dataeval$df_CHFEUR[1:lastPeriod]),
order = c(0, 0, 1))
forecasteu_temp <- forecast::forecast(modelRetaileu_temp,
h = forecastHorizon)
forecastCHFEUR_temp <- forecast::forecast(modelCHFEUR_temp, h = forecastHorizon)
forecastRetail_temp <- forecast::forecast(modelRetailExo_temp,
xreg = cbind(forecasteu_temp$mean,
forecastCHFEUR_temp$mean),
h = forecastHorizon)
forecastRolling[tauEvaluationPeriod,4] <- sum(forecastRetail_temp$mean[1:forecastHorizon])
# "Naive", no change forecast
forecastRolling[tauEvaluationPeriod,5] <- dataeval$df12_Retail_sales[lastPeriod]
# average - just take the average of different models
forecastRolling[tauEvaluationPeriod,6] <- mean(forecastRolling[tauEvaluationPeriod,1:5])
}
Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.Warning: xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.
matplot(1:70, cbind(forecastRolling,dataeval$df12_Retail_sales[171:240]))
Now we evaluate the different models according to their performance using the quadratic loss and the absolute loss. Best model is the average of the models, followed by the univarite model. - worst is the naive model.
## Calculate the forecast errors
actualData <- dataeval$df12_Retail_sales[(length(dataeval$df12_Retail_sales)-tEvaluationPeriods+1):length(dataeval$df12_Retail_sales)]
actualDataMatrix <- kronecker(matrix(1,1,6),actualData)
forecastErrors <- actualDataMatrix - forecastRolling
## Calculate the loss function (quadratic error and absolute error)
quadraticLoss <- forecastErrors^2
absoluteLoss <- abs(forecastErrors)
## Calculate the mean loss for each model
colMeans(quadraticLoss[1:70,])*100
[1] 0.03204486 0.03384111 0.03369083 0.05835098 0.05663106 0.03692762
colMeans(absoluteLoss[1:70,])*100
[1] 1.471227 1.513805 1.526135 2.067780 1.843226 1.575969
Check for significance difference between the multivariate with Retail EU and the univariate. The difference is significant with the corrected t-value. It is significant. We might favor the univariate model.
regressionDMW <- lm((quadraticLoss[1:70,1]-quadraticLoss[1:70,3]) ~ 1)
summary(regressionDMW)
Call:
lm(formula = (quadraticLoss[1:70, 1] - quadraticLoss[1:70, 3]) ~
1)
Residuals:
Min 1Q Median 3Q Max
-3.051e-04 -4.649e-05 5.561e-06 4.856e-05 2.658e-04
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -1.646e-05 1.246e-05 -1.321 0.191
Residual standard error: 0.0001043 on 69 degrees of freedom
## t-value corrected for autocorrelation
tHAC <- regressionDMW$coefficients/(NeweyWest(regressionDMW,lag = 12))^0.5
print(tHAC)
(Intercept)
(Intercept) -0.6346851
Model again with the whole timeframe but excluding the pandemic period.
modelretailsales <- forecast::auto.arima(ts_ts(data$df_Retail_sales),
ic="bic",
xreg = cbind(pandemicDummies["2000-02-01/2024-03-01"],
data$df_Retail_EU
),
max.d = 0,
trace = TRUE,
stepwise = FALSE)
modelretaileu <- forecast::auto.arima(ts_ts(data$df_Retail_EU),
xreg = pandemicDummies["2000-02-01/2024-03-01"],
ic = "bic",
trace = TRUE,
stepwise = FALSE
)
Density forecast with random draw from normal distribution of error term
tHorizons <- 12
nDraws <- 100
forecastRetailMatrix <- rbind(kronecker(matrix(1,1,nDraws),data.matrix(data$Retail_sales_cycle)),matrix(NA,tHorizons,nDraws))
forecastEUMatrix <- rbind(kronecker(matrix(1,1,nDraws),data.matrix(data$Retail_EU_cycle)),matrix(NA,tHorizons,nDraws))
pandemicDummiesMatrix <- kronecker(matrix(1,1),pandemicDummies)
T <- length(data$Retail_sales_cycle)
for (tauHorizon in 1:tHorizons) {
for (iDraw in 1:nDraws) {
modelEU_temp <- Arima(forecastEUMatrix[1:T+tauHorizon-1,iDraw],model = modelretaileu, xreg = pandemicDummiesMatrix[1:T+tauHorizon-1,])
meanForecastEU <- forecast::forecast(modelEU_temp,h=1,xreg = matrix(pandemicDummiesMatrix[(T+tauHorizon),],1,24))$mean
forecastEUMatrix[T+tauHorizon,iDraw] <- meanForecastEU + rnorm(1, mean=0, sd=modelretaileu$sigma2^0.5)
modelRetail_temp <- forecast::Arima(forecastRetailMatrix[1:T+tauHorizon-1,iDraw],model = modelretailsales, xreg = cbind(forecastEUMatrix[1:T+tauHorizon-1,iDraw],pandemicDummiesMatrix[1:T+tauHorizon-1,]))
meanForecastRetail <- forecast::forecast(modelRetail_temp,h=1,xreg = cbind(forecastEUMatrix[T+tauHorizon,iDraw],matrix(pandemicDummiesMatrix[(T+tauHorizon),],1,24)))$mean
forecastRetailMatrix[T+tauHorizon,iDraw] <- meanForecastRetail + rnorm(1, mean=0, sd=modelretailsales$sigma2^0.5)
}
}
plot(as.ts(data.matrix(data$Retail_sales_cycle)), type = "l", lwd = 2, las = 1, ylab = "",xlim = c(1,T+tHorizons))
fan(data = t(forecastRetailMatrix[(T+1):(T+tHorizons),]), type = "interval", start = (T+1))
Density forecast with ootstrapping
forecastRetailMatrixboot <- rbind(kronecker(matrix(1,1,nDraws),data.matrix(data$Retail_sales_cycle)),matrix(NA,tHorizons,nDraws))
forecastEUMatrixboot <- rbind(kronecker(matrix(1,1,nDraws),data.matrix(data$Retail_EU_cycle)),matrix(NA,tHorizons,nDraws))
modelretaileu$residuals <- modelretaileu$residuals - mean(modelretaileu$residuals)
modelretailsales$residuals <- modelretailsales$residuals - mean(modelretailsales$residuals)
T <- length(data$Retail_sales_cycle)
for (tauHorizon in 1:tHorizons) {
for (iDraw in 1:nDraws) {
modelEU_temp <- Arima(forecastEUMatrix[1:T+tauHorizon-1,iDraw],model = modelretaileu, xreg = pandemicDummiesMatrix[1:T+tauHorizon-1,])
meanForecastEU <- forecast::forecast(modelEU_temp,h=1,xreg = matrix(pandemicDummiesMatrix[(T+tauHorizon),],1,24))$mean
forecastEUMatrixboot[T+tauHorizon,iDraw] <- meanForecastEU + modelretaileu$residuals[ceiling(runif(1,0,length(modelretaileu$residuals)))]
modelRetail_temp <- forecast::Arima(forecastRetailMatrixboot[1:T+tauHorizon-1,iDraw],model = modelretailsales,xreg = cbind(forecastEUMatrixboot[1:T+tauHorizon-1,iDraw],pandemicDummiesMatrix[1:T+tauHorizon-1,]))
meanForecastRetail <- forecast::forecast(modelRetail_temp,h=1,xreg = cbind(forecastEUMatrixboot[T+tauHorizon,iDraw],matrix(pandemicDummiesMatrix[(T+tauHorizon),],1,24)))$mean
forecastRetailMatrixboot[T+tauHorizon,iDraw] <- meanForecastRetail + modelretailsales$residuals[ceiling(runif(1,0,length(modelretailsales$residuals)))]
}
}
plot(as.ts(data.matrix(data$Retail_sales_cycle)), type = "l", lwd = 2, las = 1, ylab = "",xlim = c(1,T+tHorizons))
fan(data = t(forecastRetailMatrixboot[(T+1):(T+tHorizons),]), type = "interval", start = T+1)